You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can start with simple strings like yesterday, #{n} days ago, but can also be improved to last Wednesday, a week ago (which should resolve to 7 days ago)
This should be implemented as a separate module: (if one doesn't already exist)
which takes one argument and the present Date() (defaults to Date() if not supplied)
parses the argument, returns a Date() object.
can be given conditionals such must be in the past, must be in the future, etc.
The text was updated successfully, but these errors were encountered:
@light94 Thanks a lot for that snippet of code. I couldn't really get the nested if statements, but I did understand your thinking behind this.
I have setup everything both in this module terminal-wallet and also, I have created a new module relative-date-reverse, which will house the code for solving this problem.
I have used some of the code above, and cleaned it up, and used it to implement basic stuff like yesterday, day before yesterday, etc)
I hope you can find some time to help me out on that module! (index.js)
This has a lot of possibility.
Can start with simple strings like
yesterday
,#{n} days ago
, but can also be improved tolast Wednesday
,a week ago
(which should resolve to7 days ago
)This should be implemented as a separate module: (if one doesn't already exist)
Date()
(defaults toDate()
if not supplied)Date()
object.must be in the past
,must be in the future
, etc.The text was updated successfully, but these errors were encountered: