9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] calendar diff
@ 2000-12-01 16:02 anothy
  0 siblings, 0 replies; only message in thread
From: anothy @ 2000-12-01 16:02 UTC (permalink / raw)
  To: 9fans

the following small change to calendar.c will
allow it to recognize YYYY/MM/DD style dates,
in addition to all the ones it curently knows
about. a minor bug is that 2000/012/023 looks
like a valid date.
-α.

diff new/calendar.c old/calendar.c
122,123c122,123
< 		"(^| |\t)(%d( |\t|/)+)?((%s( |\t)+)|(0?%d/))0?%d( |\t|$)",
< 		tm->year+1900, mo, tm->mon+1, tm->mday);
---
> 		"(^| |\t)((%s( |\t)+)|(%d/))%d( |\t|$)",
> 		mo, tm->mon+1, tm->mday);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-01 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-01 16:02 [9fans] calendar diff anothy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).