format
Parameters:
- date
- format
Formats the date. First argument can be a Date object or a date string. By default date is parsed to the YYYY-MM-DD format.
isostring
Parameters:
- value
Returns a string in simplified extended ISO format.
prettydate
Parameters:
- date
- localization
Returns a string, that contains: the name of weekday, day of the month (from 1 to 31), name of the month, and year (four digits for dates between year 1000 and 9999). Localization can be "en-En" or "pl-Pl", in other case function throws error. By default localization equals "en-En".
timestamp
Parameters:
- date
- pattern
hours
Parameters:
- date
Returns the hours of the day (from 0 to 23) of the passed date.
minutes
Parameters:
- date
Returns the minutes of the hour (from 0 to 59) of the passed date.
seconds
Parameters:
- date
Returns the seconds of the minute (from 0 to 59) of the passed date.
day
Parameters:
- date
Returns the day of the month (from 1 to 31) of the passed date.
month
Parameters:
- date
Returns the month (from 0 to 11) of the passed date.
weekday
Parameters:
- date
Returns the day of the week (from 0 to 6) of the specified date.
year
Parameters:
- date
Returns the year of the passed date.
timeago
Parameters:
- date
Returns a human-readable string representing how long ago the date occurred (e.g., "2 hours ago", "3 days ago").