1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

srfi-19: Fix ~V converter in date->string.

The ~V is supposed to print ISO week number, not a week number.  This
commit fixes that.

* module/srfi/srfi-19.scm (date-week-number-iso): New procedure taken
  from the reference implementation.
  (directives)<#\V>: Use it.
* test-suite/tests/srfi-19.test ("date->string ~V"): Add tests taken
  from the reference test suite.
* doc/ref/srfi-modules.texi (SRFI-19 Date to string): Mention ISO-8601
  in description for ~V.

Fixes <https://bugs.gnu.org/74841>.
Edited by lloda <lloda@sarc.name>.
This commit is contained in:
Tomas Volf 2025-01-24 17:23:17 +01:00 committed by Daniel Llorens
parent 46a0ee7779
commit c1353972ee
3 changed files with 81 additions and 5 deletions

View file

@ -2864,8 +2864,8 @@ with locale decimal point, eg.@: @samp{5.2}
@item @nicode{~T} @tab time, 24 hour clock, @samp{~H:~M:~S}
@item @nicode{~U} @tab week of year, Sunday first day of week,
@samp{00} to @samp{52}
@item @nicode{~V} @tab week of year, Monday first day of week,
@samp{01} to @samp{53}
@item @nicode{~V} @tab ISO 8601 week number of the year,
Monday first day of week, @samp{01} to @samp{53}
@item @nicode{~w} @tab day of week, 0 for Sunday, @samp{0} to @samp{6}
@item @nicode{~W} @tab week of year, Monday first day of week,
@samp{00} to @samp{52}