-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PORT] Add getNextViableDate, getPreviousViableDate, getNextViableTime, getPreviousViableTime pre-built functions #2601
Merged
Conversation
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
…ft/botbuilder-js into hond/expression-refactor
Pull Request Test Coverage Report for Build 154944
💛 - Coveralls |
cosmicshuai
changed the title
Shuwan/timex date func
[PORT] Add getNextViableDate, getPreviousViableDate, getNextViableTime, getPreviousViableTime pre-built functions
Jul 29, 2020
chrimc62
reviewed
Aug 5, 2020
chrimc62
reviewed
Aug 5, 2020
libraries/adaptive-expressions/src/builtinFunctions/getNextViableDate.ts
Show resolved
Hide resolved
chrimc62
reviewed
Aug 5, 2020
libraries/adaptive-expressions/src/builtinFunctions/getNextViableTime.ts
Show resolved
Hide resolved
chrimc62
reviewed
Aug 5, 2020
libraries/adaptive-expressions/src/builtinFunctions/getPreviousViableDate.ts
Show resolved
Hide resolved
chrimc62
reviewed
Aug 5, 2020
libraries/adaptive-expressions/src/builtinFunctions/getPreviousViableTime.ts
Show resolved
Hide resolved
chrimc62
suggested changes
Aug 5, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
chrimc62
reviewed
Aug 6, 2020
chrimc62
reviewed
Aug 6, 2020
chrimc62
approved these changes
Aug 6, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the two remaining any -> Expression and you are good to go. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes: #2559
Assume today is 2020-06-12 and current time is 15:42:21
getNextViableDate:
description: given a timex property of a valid month and day of month, evaluate the next viable date based on the current time at certain timezone
The signature is getNextViableDate(timex: string, timezone? : string) -> result:string
getNextViableDate("XXXX-12-20", "America/Los_Angelas") -> "2020-12-20"
getNextViableDate("XXXX-02-29") -> "2024-02-29"
getPreviousViableDate:
description: given a timex property of a valid month and day of month, evaluate the previous viable date based on the current time at certain timezone
The signature is getPreviousViableDate(timex: string, timezone? : string) -> result:string
getPreviousViableDate("XXXX-12-20", "Eastern Standard Time") -> "2019-12-20"
getPreviousViableDate("XXXX-02-29") -> "2020-02-29"
getNextViableTime:
description: given a timex property of a valid minutes and seconds, evaluate the next viable time based on the current time at certain timezone
The signature is getNextViableTime(timex: string, timezone? : string) -> result:string
getNextViableTime("TXX:12:14", "Asia/Tokyo") -> "T16:12:14"
getNextViableTime("TXX:52:14) -> "T15:52:14"
getPreviousViableTime:
description: given a timex property of a valid minutes and seconds, evaluate the previous viable time based on the current time at certain timezone
The signature is getPreviousViableTime(timex: string, timezone? : string) -> result:string
getPreviousViableTime("TXX:12:14", 'Europe/London') -> "T15:12:14"
getPreviousViableTime("TXX:52:14") -> "T14:52:14"