-
-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(db-ql): mark serverDate regexp as deprecated
- Loading branch information
Showing
2 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
import { SYMBOL_SERVER_DATE } from '../helper/symbol' | ||
|
||
export class ServerDate { | ||
readonly offset: number; | ||
readonly offset: number | ||
|
||
constructor({ offset = 0 } = {}) { | ||
this.offset = offset | ||
} | ||
constructor({ offset = 0 } = {}) { | ||
this.offset = offset | ||
} | ||
|
||
get _internalType() { | ||
return SYMBOL_SERVER_DATE | ||
} | ||
get _internalType() { | ||
return SYMBOL_SERVER_DATE | ||
} | ||
|
||
parse() { | ||
return { | ||
$date: { | ||
offset: this.offset | ||
} | ||
parse() { | ||
return { | ||
$date: { | ||
offset: this.offset | ||
} | ||
} | ||
} | ||
} | ||
|
||
export function ServerDateConstructor(opt?: { offset: number}) { | ||
/** | ||
* @deprecated This method is deprecated, not implemented in server side | ||
* @param opt | ||
* @returns | ||
*/ | ||
export function ServerDateConstructor(opt?: { offset: number }) { | ||
return new ServerDate(opt) | ||
} |