Remaster is a language-independent library design framework. It enables language designers to reuse a good design decision for the standard library, and provides a metadata for language bindings. It is not an initiative to replace the existing standard library, nor make the common standard library (what CLI and JVM has done).
This document is very early draft and subject to change.
weekdayA set of weekdays.
monday or mon = 0: intMonday.
tuesday or tue = 1: intTuesday.
wednesday or wed = 2: intWednesday.
thursday or thu = 3: intThursday.
friday or fri = 4: intFriday.
saturday or sat = 5: intSaturday.
sunday or sun = 6: intSunday.
dateRepresents a single date in the Gregorian calendar. For the dates before the Gregorian calendar exists it uses the extended version of Gregorian calendar. For the conversion between Gregorian calendar with other calendar systems see julian date.
[get] min date(): dateReturns the minimum possible date value.
[get] max date(): dateReturns the maximum possible date value.
[is] leap year(year: int): boolReturns true when given year is a leap year, in the Gregorian calendar.
[make] date [from date](year: int, month: int, day: int): date or errorCreates a new date value from given year, month and day of the month.
[make] date [from week date](week: ISO week, dow or day: weekday): date or errorCreates a new date value from given ISO week and day of the week.
[make] date [from ordinal date](year: int, doy or day: int): date or errorCreates a new date value from given year and day of the year.
[get] year(self: date): intReturns the year.
[get] month(self: date): intReturns the month.
[get] day(self: date): intReturns the day of the month.
[get] ISO week(self: date): ISO weekReturns the ISO week that contains given date.
[get] weekday(self: date): weekdayReturns the day of the week.
[get] day of year(self: date): intReturns the day of the year.
[to string](self: date): stringReturns the string representation, or more explicitly, ISO 8601 date representation (YYYY-MM-DD) of given date.
[difference](self: date, other: date): durationReturns the difference between two dates.
[difference] [in days](self: date, other: date): intReturns the difference between two dates, in days.
[increase](self: date): date or errorIncreases given date by one day.
[decrease](self: date): date or errorDecreases given date by one day.