hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit b554a7223631de110243429b6faadae6dac59a47
parent 04b6dbb5225d092d4c7001d824f8012a3729c831
Author: Byron Torres <b@torresjrjr.com>
Date:   Thu,  7 Mar 2024 00:13:58 +0000

time::date: improve observer fn docs

Signed-off-by: Byron Torres <b@torresjrjr.com>

Diffstat:
Mtime/date/observe.ha | 16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/time/date/observe.ha b/time/date/observe.ha @@ -12,28 +12,30 @@ export fn era(d: *date) int = _era(d); // Observes a [[date]]'s year. export fn year(d: *date) int = _year(d); -// Observes a [[date]]'s month of the year. +// Observes a [[date]]'s month of the year. Range January=1 to December=12. export fn month(d: *date) int = _month(d); -// Observes a [[date]]'s day of the month. +// Observes a [[date]]'s day of the month. Range 1 to 31. export fn day(d: *date) int = _day(d); -// Observes a [[date]]'s day of the week; Monday=0 to Sunday=6. +// Observes a [[date]]'s day of the week. Range Monday=0 to Sunday=6. export fn weekday(d: *date) int = _weekday(d); -// Observes a [[date]]'s ordinal day of the year. +// Observes a [[date]]'s ordinal day of the year. Range 1 to 366. export fn yearday(d: *date) int = _yearday(d); // Observes a [[date]]'s ISO week-numbering year. export fn isoweekyear(d: *date) int = _isoweekyear(d); -// Observes a [[date]]'s Gregorian week starting Monday. +// Observes a [[date]]'s Gregorian week starting Monday. Range 0 to 53. +// All days in a year before the year's first Monday belong to week 0. export fn week(d: *date) int = _week(d); -// Observes a [[date]]'s Gregorian week starting Sunday. +// Observes a [[date]]'s Gregorian week starting Sunday. Range 0 to 53. +// All days in a year before the year's first Sunday belong to week 0. export fn sundayweek(d: *date) int = _sundayweek(d); -// Observes a [[date]]'s ISO week. +// Observes a [[date]]'s ISO week-numbering week. Range 0 to 53. export fn isoweek(d: *date) int = _isoweek(d); // Observes a [[date]]'s hour of the day.