Planarly provides a suite of functions under the Date namespace for creating, manipulating and formatting dates.
Currently it is based on the ISO 8601 date format — YYYY-MM-DD. An example date in this format is 2021-05-22. All date values to be used by the following functions (except Date.Date() for creating a date) are required to be in ISO8601 format.
Prepares a date string based on 3 arguments — year, month and day.
Usage examples:
Date.Date(2021, 5, 22) returns the date string 2021-05-22.
Date.Date(2020 & 2016,1 & 11,1 & 30) returns a 1x2 table of date strings "2020-01-01" & "2016-11-30".
Returns the year from a date string as an integer. Usage example:
Date.Year("2020-01-01" & "2016-11-30") returns 2020 & 2016
Returns the month from a date string as an integer. Usage example:
Date.Year("2020-01-01" & "2016-11-30" returns 1 & 11
Returns the month day from a date string as an integer. Usage example:
Date.Year("2020-01-01" & "2016-11-30") returns 1 & 30
Returns current date as a string in format yyyy-mm-dd.
Usage example:
Date.Today() returns 2022-04-19
Returns current day as a string in format yyyy-mm-dd.hh:mm:ss
Usage example: