Day of the week: Difference between revisions

m
Line 1,201:
=={{header|Ursala}}==
 
A standard library, <code>stt</code>, provides basic date manipulation functions,
and is imported in this example. Unix era times denominated in seconds since
1969 (excluding leap seconds) are represented as natural numbers with
unlimited precision. Results are valid for the arbitrarily distant
future assuming the Gregorian calendar remains in forceeffect.
 
The algorithm relies on the <code>string_to_time</code> function converting a date
expressed as a character string to seconds without needing a weekday field in
the input, and the <code>time_to_string</code> function outputting the corresponding
date with the weekday included. The output is then filtered for Sundays.
 
<lang Ursala>#import std
#import std
#import nat
#import stt
Line 1,221 ⟶ 1,220:
#show+
 
sunday_years = ~&zS sep` * =]'Sun'*~ christmases</lang>
</lang>
output:
<pre>2011
<pre>
2011
2016
2022
Line 1,241 ⟶ 1,238:
2107
2112
2118</pre>
</pre>
 
=={{header|Vedit macro language}}==
Anonymous user