 |
|
|
|
| Author |
Message |
Otherjohn
Joined: 08 Aug 2007 Posts: 3
|
Posted: Fri Jun 22, 2007 4:15 pm Post subject: Endless September Calendar tool |
|
|
Does anyone know where I can find a calendar tool to convert today's
date into Endless September date? Almost any platform will do. Palm,
Mac, Windows or Dos. If I must I can run a C64 version.
Archived from group: rec>humor>oracle>d |
|
| Back to top |
|
 |
Jurjen Oskam
Joined: 08 Aug 2007 Posts: 1
|
Posted: Fri Jun 22, 2007 9:17 pm Post subject: Re: Endless September Calendar tool |
|
|
On 2007-06-22, Otherjohn wrote:
> Does anyone know where I can find a calendar tool to convert today's
> date into Endless September date? Almost any platform will do. Palm,
> Mac, Windows or Dos. If I must I can run a C64 version.
Hey, this made me remember some ancient Perl-script I once found on
Usenet somewhere. It's probably more than a decade old:
#!/usr/bin/perl
# sepdate utility
# usage: sepdate [month date year]
# where day month year are date of interest -- default is today
# e.g. sepdate 10 21 95
# for October 21, 1995
#
# Prints the date in same format as Unix date command (default)
# but unlike the buggy date command this script does take into account the
# fact that September 1993 never ended.
# Known bugs and odd features:
# - if date other than today is specified, time is displayed as 00:00:00.
# - arguments are not checked other than to see if there are 3 or none.
# - dates prior to 9 1 93 are rendered as nonpositive dates in Sept. 1993.
require "timelocal.pl";
if ($#ARGV == 2) {
$thetime = &timelocal(0,0,0,$ARGV[1],$ARGV[0]-1,$ARGV[2])
}
elsif ($#ARGV == -1) {
$thetime = time
}
else {
die 'usage: sepdate [month date year]'
}
$days = int (($thetime - &timelocal(0,0,0,31,7,93)) / (60 * 60 * 24));
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($thetime);
printf ("%3s Sep %2d %2.2d:%2.2d:%2.2d %3s 1993\n", (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday],$days,$hour,$min,$sec,(EST,EDT)[$isdst]);
Just substitute your timezone names for EST and EDT. Or write a more modern
version.
--
Jurjen Oskam
Savage's Law of Expediency:
You want it bad, you'll get it bad. |
|
| Back to top |
|
 |
Harry Gross
Joined: 08 Aug 2007 Posts: 26
|
Posted: Sat Jun 23, 2007 12:00 am Post subject: Re: Endless September Calendar tool |
|
|
Jurjen Oskam wrote:
> On 2007-06-22, Otherjohn wrote:
>
> # Prints the date in same format as Unix date command (default)
> # but unlike the buggy date command this script does take into account the
> # fact that September 1993 never ended.
Ok - please forgive my ignorance, but can someone explain to me WHY
September 1993 never ended????? I've never heard that before:-)
Harry |
|
| Back to top |
|
 |
TimC
Joined: 04 Aug 2007 Posts: 54
|
Posted: Sat Jun 23, 2007 5:25 pm Post subject: Re: Endless September Calendar tool |
|
|
On 2007-06-22, Otherjohn (aka Bruce)
was almost, but not quite, entirely unlike tea:
> Does anyone know where I can find a calendar tool to convert today's
> date into Endless September date? Almost any platform will do. Palm,
> Mac, Windows or Dos. If I must I can run a C64 version.
Operating Systems troll. "almost any", completely ignoring linux? Oh
well, Lunix runs on the C64, so here's a ruby script:
#!/usr/bin/env ruby
require 'date'
print Time.now.strftime "%a Sep #{Date.today-Date.new(1993,8,31)} %H:%M:%S %Z 1993"
print "\n"
--
TimC
"Any sufficiently complicated C or Fortran program contains an ad hoc
informally-specified bug-ridden slow implementation of half of Common
Lisp." -- Greenspun's Tenth Rule of Programming |
|
| Back to top |
|
 |
TimC
Joined: 04 Aug 2007 Posts: 54
|
Posted: Sat Jun 23, 2007 5:32 pm Post subject: Re: Endless September Calendar tool |
|
|
On 2007-06-22, Jurjen Oskam (aka Bruce)
was almost, but not quite, entirely unlike tea:
> On 2007-06-22, Otherjohn wrote:
>
>> Does anyone know where I can find a calendar tool to convert today's
>> date into Endless September date? Almost any platform will do. Palm,
>> Mac, Windows or Dos. If I must I can run a C64 version.
>
> Hey, this made me remember some ancient Perl-script I once found on
> Usenet somewhere. It's probably more than a decade old:
>
> #!/usr/bin/perl
>
> # sepdate utility
> # usage: sepdate [month date year]
> # where day month year are date of interest -- default is today
> # e.g. sepdate 10 21 95
> # for October 21, 1995
> #
> # Prints the date in same format as Unix date command (default)
> # but unlike the buggy date command this script does take into account the
> # fact that September 1993 never ended.
> # Known bugs and odd features:
> # - if date other than today is specified, time is displayed as 00:00:00.
> # - arguments are not checked other than to see if there are 3 or none.
> # - dates prior to 9 1 93 are rendered as nonpositive dates in Sept. 1993.
>
> require "timelocal.pl";
>
> if ($#ARGV == 2) {
> $thetime = &timelocal(0,0,0,$ARGV[1],$ARGV[0]-1,$ARGV[2])
> }
> elsif ($#ARGV == -1) {
> $thetime = time
> }
> else {
> die 'usage: sepdate [month date year]'
> }
>
> $days = int (($thetime - &timelocal(0,0,0,31,7,93)) / (60 * 60 * 24));
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($thetime);
>
> printf ("%3s Sep %2d %2.2d:%2.2d:%2.2d %3s 1993\n", (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday],$days,$hour,$min,$sec,(EST,EDT)[$isdst]);
>
>
> Just substitute your timezone names for EST and EDT. Or write a more modern
> version.
Like this one:
#!/usr/bin/perl
# Adapted and updated by TimC from a version attributed to Rich Holmes
use Time::Local;
use POSIX qw(strftime);
if ($#ARGV == 2) {
$todday = $ARGV[0];
$todmon = $ARGV[1]-1;
$todyr = $ARGV[2];
$todti = timelocal(0, 0, 0, $todday, $todmon, $todyr);
} elsif ($#ARGV == -1) {
$todti = time;
} else {
die "usage: $0 [day month year]\n"
}
$septime = timelocal(0, 0, 0, 31, 7, 93);
$tdiff = $todti - $septime;
$days = int ($tdiff / (60 * 60 * 24));
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
# this seems like overkill
$tzstr = strftime("%Z", $sec, $min, $hour, $mday, $mon, $year);
printf ("%3s Sep %2d %2.2d:%2.2d:%2.2d %3s 1993\n",
(Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday],
$days,$hour,$min,$sec,$tzstr);
--
TimC
"Legacy (adj): an uncomplimentary computer-industry epithet that
means 'it works'." -- Anthony DeBoer in ASR |
|
| Back to top |
|
 |
God Rudy
Joined: 08 Aug 2007 Posts: 8
|
Posted: Sat Jun 23, 2007 1:49 pm Post subject: Re: Endless September Calendar tool |
|
|
On Fri, 22 Jun 2007 20:00:36 -0400, Harry Gross wrote:
> Jurjen Oskam wrote:
>> On 2007-06-22, Otherjohn wrote:
>>
>> # Prints the date in same format as Unix date command (default)
>> # but unlike the buggy date command this script does take into account the
>> # fact that September 1993 never ended.
>
>
> Ok - please forgive my ignorance, but can someone explain to me WHY
> September 1993 never ended????? I've never heard that before:-)
>
> Harry
Back in September 1993, all AOL users got access to the internet. |
|
| Back to top |
|
 |
Harry Gross
Joined: 08 Aug 2007 Posts: 26
|
Posted: Sat Jun 23, 2007 2:57 pm Post subject: Re: Endless September Calendar tool |
|
|
God Rudy wrote:
> On Fri, 22 Jun 2007 20:00:36 -0400, Harry Gross wrote:
>
>> Jurjen Oskam wrote:
>>> On 2007-06-22, Otherjohn wrote:
>>>
>>> # Prints the date in same format as Unix date command (default)
>>> # but unlike the buggy date command this script does take into account the
>>> # fact that September 1993 never ended.
>>
>> Ok - please forgive my ignorance, but can someone explain to me WHY
>> September 1993 never ended????? I've never heard that before:-)
>>
>> Harry
>
> Back in September 1993, all AOL users got access to the internet.
Aha! Not being a fan of AOL, I wouldn't have known that:-) Thanks for
the enlightenment;-)
Harry |
|
| Back to top |
|
 |
God Rudy
Joined: 08 Aug 2007 Posts: 8
|
Posted: Sat Jun 23, 2007 2:06 pm Post subject: Re: Endless September Calendar tool |
|
|
On Sat, 23 Jun 2007 10:57:59 -0400, Harry Gross wrote:
> God Rudy wrote:
>> On Fri, 22 Jun 2007 20:00:36 -0400, Harry Gross wrote:
>>
>>> Jurjen Oskam wrote:
>>>> On 2007-06-22, Otherjohn wrote:
>>>>
>>>> # Prints the date in same format as Unix date command (default)
>>>> # but unlike the buggy date command this script does take into account the
>>>> # fact that September 1993 never ended.
>>>
>>> Ok - please forgive my ignorance, but can someone explain to me WHY
>>> September 1993 never ended????? I've never heard that before:-)
>>>
>>> Harry
>>
>> Back in September 1993, all AOL users got access to the internet.
>
> Aha! Not being a fan of AOL, I wouldn't have known that:-) Thanks for
> the enlightenment;-)
>
> Harry
for more info:
http://www.catb.org/~esr/jargon/html/S/September-that-never-ended.html
Looks like i mixed up internet/usenet
Rudy |
|
| Back to top |
|
 |
Harry Gross
Joined: 08 Aug 2007 Posts: 26
|
Posted: Sat Jun 23, 2007 3:58 pm Post subject: Re: Endless September Calendar tool |
|
|
God Rudy wrote:
> On Sat, 23 Jun 2007 10:57:59 -0400, Harry Gross wrote:
>
>> God Rudy wrote:
>>> On Fri, 22 Jun 2007 20:00:36 -0400, Harry Gross wrote:
>>>
>>>> Jurjen Oskam wrote:
>>>>> On 2007-06-22, Otherjohn wrote:
>>>>>
>>>>> # Prints the date in same format as Unix date command (default)
>>>>> # but unlike the buggy date command this script does take into account the
>>>>> # fact that September 1993 never ended.
>>>> Ok - please forgive my ignorance, but can someone explain to me WHY
>>>> September 1993 never ended????? I've never heard that before:-)
>>>>
>>>> Harry
>>> Back in September 1993, all AOL users got access to the internet.
>> Aha! Not being a fan of AOL, I wouldn't have known that:-) Thanks for
>> the enlightenment;-)
>>
>> Harry
>
>
> for more info:
> http://www.catb.org/~esr/jargon/html/S/September-that-never-ended.html
> Looks like i mixed up internet/usenet
>
> Rudy
Given the date in question, I assumed that's what you meant
Harry |
|
| Back to top |
|
 |
Otherjohn
Joined: 08 Aug 2007 Posts: 3
|
Posted: Mon Jun 25, 2007 1:40 pm Post subject: Re: Endless September Calendar tool |
|
|
On Sat, 23 Jun 2007 13:25:00 +1000, TimC
wrote:
>On 2007-06-22, Otherjohn (aka Bruce)
> was almost, but not quite, entirely unlike tea:
>> Does anyone know where I can find a calendar tool to convert today's
>> date into Endless September date? Almost any platform will do. Palm,
>> Mac, Windows or Dos. If I must I can run a C64 version.
>
>Operating Systems troll. "almost any", completely ignoring linux? Oh
>well, Lunix runs on the C64, so here's a ruby script:
>
>#!/usr/bin/env ruby
>
>require 'date'
>print Time.now.strftime "%a Sep #{Date.today-Date.new(1993,8,31)} %H:%M:%S %Z 1993"
>print "\n"
Yeah, ok. I did toss that line in there to provoke a response from the
Linux crowd. That and I half expected someone in here to give me a
script made to run on the Mars Rovers' OS or something.
Thankseverybody for the scripts. |
|
| Back to top |
|
 |
Dave Hinz
Joined: 08 Aug 2007 Posts: 23
|
Posted: Tue Jun 26, 2007 3:16 am Post subject: Re: Endless September Calendar tool |
|
|
On Mon, 25 Jun 2007 09:40:42 -0400, Otherjohn wrote:
> On Sat, 23 Jun 2007 13:25:00 +1000, TimC
> wrote:
>>Operating Systems troll. "almost any", completely ignoring linux? Oh
>>well, Lunix runs on the C64, so here's a ruby script:
> Yeah, ok. I did toss that line in there to provoke a response from the
> Linux crowd. That and I half expected someone in here to give me a
> script made to run on the Mars Rovers' OS or something.
Um...
http://www.linuxdevices.com/news/NS3674252711.html |
|
| Back to top |
|
 |
tie.poe
Joined: 08 Aug 2007 Posts: 2
|
Posted: Tue Jun 26, 2007 1:04 pm Post subject: Re: Endless September Calendar tool |
|
|
On Jun 23, 6:32 am, TimC
astro.swin.edu.au> wrote:
> On 2007-06-22, Jurjen Oskam (aka Bruce)
> was almost, but not quite, entirely unlike tea:
>
>
>
> > On 2007-06-22, Otherjohn wrote:
>
> >> Does anyone know where I can find a calendar tool to convert today's
> >> date into Endless September date? Almost any platform will do. Palm,
> >> Mac, Windows or Dos. If I must I can run a C64 version.
>
> > Hey, this made me remember some ancient Perl-script I once found on
> > Usenet somewhere. It's probably more than a decade old:
>
> > #!/usr/bin/perl
>
> > # sepdate utility
> > # usage: sepdate [month date year]
> > # where day month year are date of interest -- default is today
> > # e.g. sepdate 10 21 95
> > # for October 21, 1995
> > #
> > # Prints the date in same format as Unix date command (default)
> > # but unlike the buggy date command this script does take into account the
> > # fact that September 1993 never ended.
> > # Known bugs and odd features:
> > # - if date other than today is specified, time is displayed as 00:00:00.
> > # - arguments are not checked other than to see if there are 3 or none.
> > # - dates prior to 9 1 93 are rendered as nonpositive dates in Sept. 1993.
>
> > require "timelocal.pl";
>
> > if ($#ARGV == 2) {
> > $thetime = &timelocal(0,0,0,$ARGV[1],$ARGV[0]-1,$ARGV[2])
> > }
> > elsif ($#ARGV == -1) {
> > $thetime = time
> > }
> > else {
> > die 'usage: sepdate [month date year]'
> > }
>
> > $days = int (($thetime - &timelocal(0,0,0,31,7,93)) / (60 * 60 * 24));
> > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($thetime);
>
> > printf ("%3s Sep %2d %2.2d:%2.2d:%2.2d %3s 1993\n", (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday],$days,$hour,$min,$sec,(EST,EDT)[$isdst]);
>
> > Just substitute your timezone names for EST and EDT. Or write a more modern
> > version.
>
> Like this one:
>
> #!/usr/bin/perl
>
> # Adapted and updated by TimC from a version attributed to Rich Holmes
>
> use Time::Local;
> use POSIX qw(strftime);
>
> if ($#ARGV == 2) {
> $todday = $ARGV[0];
> $todmon = $ARGV[1]-1;
> $todyr = $ARGV[2];
> $todti = timelocal(0, 0, 0, $todday, $todmon, $todyr);} elsif ($#ARGV == -1) {
>
> $todti = time;} else {
>
> die "usage: $0 [day month year]\n"
>
> }
>
> $septime = timelocal(0, 0, 0, 31, 7, 93);
>
> $tdiff = $todti - $septime;
> $days = int ($tdiff / (60 * 60 * 24));
>
> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
>
> # this seems like overkill
> $tzstr = strftime("%Z", $sec, $min, $hour, $mday, $mon, $year);
> printf ("%3s Sep %2d %2.2d:%2.2d:%2.2d %3s 1993\n",
> (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday],
> $days,$hour,$min,$sec,$tzstr);
>
Now _that's_ ugly*, but not as ugly as what I added here
http://en.wikipedia.org/wiki/Eternal_September
My excuse is that I don't know PHP and/or Wikipedia's macro language.
* Which in Perl is considered a compliment.
--
Teh sad thing is that in C# it's trivial
DateTime.Now.Subtract(new DateTime(1993, 8, 31)).Days; |
|
| Back to top |
|
 |
TimC
Joined: 04 Aug 2007 Posts: 54
|
Posted: Wed Jun 27, 2007 1:02 am Post subject: Re: Endless September Calendar tool |
|
|
On 2007-06-26, tie.poe@gmail.com (aka Bruce)
was almost, but not quite, entirely unlike tea:
> On Jun 23, 6:32 am, TimC
> astro.swin.edu.au> wrote:
>> # this seems like overkill
>> $tzstr = strftime("%Z", $sec, $min, $hour, $mday, $mon, $year);
>> printf ("%3s Sep %2d %2.2d:%2.2d:%2.2d %3s 1993\n",
>> (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$wday],
>> $days,$hour,$min,$sec,$tzstr);
>>
>
> Now _that's_ ugly*, but not as ugly as what I added here
> http://en.wikipedia.org/wiki/Eternal_September
No mention of Google whatsoever?
Some claim September never ended, or at least, it is now October the
800th or so.
> --
> Teh sad thing is that in C# it's trivial
> DateTime.Now.Subtract(new DateTime(1993, 8, 31)).Days;
Depends what you are trying to do. Format it as an approximately RFC
822 format?
--
TimC
When the revolution comes, we'll need a longer wall. -- Tom De Mulder |
|
| Back to top |
|
 |
Otherjohn
Joined: 08 Aug 2007 Posts: 3
|
Posted: Tue Jun 26, 2007 8:29 pm Post subject: Re: Endless September Calendar tool |
|
|
On 25 Jun 2007 23:16:28 GMT, Dave Hinz wrote:
>On Mon, 25 Jun 2007 09:40:42 -0400, Otherjohn wrote:
>> On Sat, 23 Jun 2007 13:25:00 +1000, TimC
>> wrote:
>
>>>Operating Systems troll. "almost any", completely ignoring linux? Oh
>>>well, Lunix runs on the C64, so here's a ruby script:
>
>> Yeah, ok. I did toss that line in there to provoke a response from the
>> Linux crowd. That and I half expected someone in here to give me a
>> script made to run on the Mars Rovers' OS or something.
>
>Um...
>http://www.linuxdevices.com/news/NS3674252711.html
Damn! If you can't rely on NASA to use wildly esoteric computer
systems then who can you rely on? |
|
| Back to top |
|
 |
Jellyroll Papadopoulos
Joined: 08 Aug 2007 Posts: 8
|
Posted: Tue Jul 17, 2007 5:16 pm Post subject: Re: Endless September Calendar tool |
|
|
Also Sprach Otherjohn:
Massage:
Froom: Otherjohn
On: Fri, 5043 Sep 1993 12:15:10 -0400
________________________________________________________________________________
> Does anyone know where I can find a calendar tool to convert today's
> date into Endless September date? Almost any platform will do. Palm,
> Mac, Windows or Dos. If I must I can run a C64 version.
Mailtraq Scripting Language Version:
| date_header := Header("Date"),
| date_month := Params( date_header," ", 3),
| date_time_string := WildcardMatchReplace( date_header , "*, * * * * ? *" , "$2/" ++ RJ(date_month,2,"0") ++ "/$4 $5:$6$7" ),
| date_string := LJ(date_time_string,10),
| this_date := DateToReal(date_string),
| this_time := DateTimeToReal(date_time_string) - this_date,
| september := DateToReal("31/08/1993"),
| sept_now := this_date - september,
| tz := WildcardMatchReplace(date_header , "*, * * * * ? *" , " $8" ),
| usenet_date := FormatDate("ddd",this_date) ++ ", " ++ sept_now ++ " Sep 1993 " ++ FormatTime("hh:nn:ss", this_time + 1) ++ tz,
Uglier than PERL, but it ain't broke.
--
Jellyroll
|
|
| Back to top |
|
 |
|
|
| Related Topics: | Mark your calendar. 50 years ago tomorrow, September 20, 1955, the Soviet Union recognized the sovereignty of East Germany. We're going to miss the Soviets' wonderful ability to give entirely new meanings to words we thought we understood.
September 21 Puns Larry Krzewinski wrote: > On Wed, 28 Apr 2004 11:27:53 -0600, "Mos" wrote: > > >>>>>>>>>>> Flowers pygthur a good person is like ketchup pygthur a good > >>>>>>>>>>> meal. > >>>>>>>>>> > >>>>>>>>>> Flowers are a condiment? Imagine yoursel
30 September Puns Stan Kegel wrote: > KIDS PUNS OF THE WEAK for the week ending 10-19-04 > > > I'm watching an Oprah tape backwards. So she's Harpo. (Frank & Ernest: Bob > Thaves) Harper: Price of a laugh.
30 September Puns Antidote: An ant that cures poison victims. Aspie: A urinating donkey. Biplane: An aircraft that mates with both genders. Deacon: A criminal demon. D. Mon: Between D. Sun and D. Tues.
30 September Puns nemo wrote: > Tim Bruening wrote in message > > > Betraying: Chinese double agent. > > > > Boating: Musical watercraft. > > > > Bow-ting: Musical neck decoration. > > > > Braying |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|