Returns base date increased by given number of units of time interval.
(number)
Amount to increase by.
((DATE_PARTS | DATE_PARTS_PLURALIZED))
Date part.
(jesterday.Date)
Base date.
jesterday.Date
:
Base date increased by given unit of time interval.
Creates Date object with all properties set to default values except those found in passed object.
(jesterday.Date)
Partially set jesterday date object
jesterday.Date
:
jesterday date object with all properties set
Enum for date parts.
Enum for date parts pluralized.
Returns ending point of given time interval based on passed date.
(DATE_PARTS)
Time interval, one of
[
second|minute|hour|day|month|year
]
.
(jesterday.Date)
Base date.
jesterday.Date
:
Ending point of given time interval.
// returns { ..., hours: 19, minutes: 59, seconds: 59, milliseconds: 999 }
endOf('hour', { hours: 19, minutes: 55, seconds: 45 })
// returns { ..., month: 3, day: 31, hours: 23, minutes: 59, seconds: 59, milliseconds: 999 }
endOf('month', { month: 3, day: 20, hours: 5 })
Parses ISO date into jesterday date object.
(string)
Date in ISO format.
jesterday.Date
:
Parsed date.
Converts JavaScript Date into jesterday date.
(Date)
JavaScript date.
([type])
Optional: Timezone offset to set in created date.
jesterday.Date
:
Converted date.
Type: Object
Returns current date.
jesterday.Date
:
Current date.
Returns starting point of given time interval based on passed date.
(string)
Date part.
(jesterday.Date)
Base date.
jesterday.Date
:
Starting point of given time interval.
// returns { ..., hours: 19, minutes: 0, seconds: 0, milliseconds: 0 }
startOf('hour', { hours: 19, minutes: 55, seconds: 45 })
// returns { ..., month: 3, day: 1, hours: 0, minutes: 0, ... }
starOf('month', { month: 3, day: 20, hours: 5 })
Returns base date decreased by given number of units of time interval.
(number)
Amount to decrease by.
((DATE_PARTS | DATE_PARTS_PLURALIZED))
Time interval.
(jesterday.Date)
Base date.
jesterday.Date
:
Base date decreased by given unit of time interval.
Converts jesterday date into JS date.
(jesterday.Date)
Date to convert.
Date
:
Converted date.