squiggle/packages/website/docs/Api/Date.md
2022-06-11 08:57:02 -07:00

477 B

sidebar_position title
1 Date

makeFromYear

Date.makeFromYear: (number) => date
makeFromYear(2022.32);

toString

toString: (date) => string

subtract

subtract: (date, date) => duration
subtract: (date, duration) => date
makeFromYear(2040) - makeFromYear(2020); // 20 years
makeFromYear(2040) - years(20); // 2020

add

add: (date, duration) => date
makeFromYear(2022.32) + years(5);