queck #5749(2008/02/13 05:51 GMT) [ Other ] Rating0/0=0.00
Factor です。日付の出力部分がもっとなんとかなる気がするのですが。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
USING: kernel calendar sequences math.parser io ; : write-date ( timestamp -- ) dup timestamp-year number>string write "/" write dup timestamp-month number>string write "/" write dup timestamp-day number>string write "(" write day-of-week day-abbreviations3 nth write ")\n" write ; : week-days ( year month day -- ) make-date monday [ swap +day write-date ] curry 5 swap each ; ! example 2008 2 13 week-days ! 2008/2/11(Mon) ! 2008/2/12(Tue) ! 2008/2/13(Wed) ! 2008/2/14(Thu) ! 2008/2/15(Fri)
Rating0/0=0.00-0+
[ reply ]
queck
#5749()
[
Other
]
Rating0/0=0.00
Factor です。日付の出力部分がもっとなんとかなる気がするのですが。
USING: kernel calendar sequences math.parser io ; : write-date ( timestamp -- ) dup timestamp-year number>string write "/" write dup timestamp-month number>string write "/" write dup timestamp-day number>string write "(" write day-of-week day-abbreviations3 nth write ")\n" write ; : week-days ( year month day -- ) make-date monday [ swap +day write-date ] curry 5 swap each ; ! example 2008 2 13 week-days ! 2008/2/11(Mon) ! 2008/2/12(Tue) ! 2008/2/13(Wed) ! 2008/2/14(Thu) ! 2008/2/15(Fri)Rating0/0=0.00-0+
[ reply ]