pike.git / lib / modules / Calendar.pmod / FAQ

version» Context lines:

pike.git/lib/modules/Calendar.pmod/FAQ:81:       The day-of-time units (seconds, hours, etc) uses this    as internal representation of time.      -------------------------------------------------------------------------      Q: I'm a mad astronomer, how do I do the same conversions with    julian day numbers?      A: Julian day numbers are used as the internal representation -  for the day, and for most other bigger-then-time-of-day calculations. +  for the day, and for most other bigger-than-time-of-day calculations.       > Calendar.Day("julian",2454545);    Result: Day(Wed 19 Mar 2008)    > Calendar.Second("julian",2430122.0);    Result: Second(Tue 6 May 1941 13:00:00 CET)       Julian day numbers from day units and bigger are integers,    representing the new julian number on that day. Julian day    numbers from time of day units are represented in floats.   
pike.git/lib/modules/Calendar.pmod/FAQ:138:    > Calendar.now()->format_nicez();    Result: "10 Jan 10:51:15.489603 CET"       or in a format not depending on the unit,       > Calendar.Week()->format_ymd();    Result: "2001-01-08"    > Calendar.Day()->format_time();    Result: "2001-01-10 00:00:00"    -  This is all the formats: +  These are all the formats:    -  +  format_commonlog "10/Jan/2001:10:49:57 +0100"    format_ext_time "Wednesday, 10 January 2001 10:49:57"    format_ext_time_short "Wed, 10 Jan 2001 10:49:57 CET"    format_ext_ymd "Wednesday, 10 January 2001"    format_iso_time "2001-01-10 (Jan) -W02-3 (Wed) 10:49:57 UTC+1"    format_iso_ymd "2001-01-10 (Jan) -W02-3 (Wed)" -  +  format_iso_short "20010110T10:49:57" +  format_mdy "10/1/1"    format_mod "10:49"    format_month "2001-01"    format_month_short "200101"    format_mtime "2001-01-10 10:49" -  +  format_nice "10 Jan 2001 10:49:57" +  format_nicez "10 Jan 2001 10:49:57 CET"    format_time "2001-01-10 10:49:57"    format_time_short "20010110 10:49:57"    format_time_xshort "010110 10:49:57"    format_tod "10:49:57"    format_tod_short "104957"    format_todz "10:49:57 CET"    format_todz_iso "10:49:57 UTC+1"    format_week "2001-w2"    format_week_short "2001w2"    format_iso_week "2001-W02"
pike.git/lib/modules/Calendar.pmod/FAQ:170:    format_xtime "2001-01-10 10:49:57.539198"    format_xtod "10:49:57.539658"    format_ymd "2001-01-10"    format_ymd_short "20010110"    format_ymd_xshort "010110"       format_ctime "Wed Jan 10 10:49:57 2001\n"    format_smtp "Wed, 10 Jan 2001 10:49:57 +0100"    format_http "Wed, 10 Jan 2001 09:49:57 GMT"    +  For objects with a size, e.g. when taking the distance between two +  time points, the format_elapsed function can also be called to get +  something similar to "35d8:06:41.547". +    -------------------------------------------------------------------------      Q: How old am I?      A: First, you need to create the time period representing your age.       > object t=Calendar.dwim_time("1638 dec 23 7:02 pm")    ->distance(Calendar.now());    Result: Fraction(Thu 23 Dec 1638 19:02:00.000000 LMT -    Wed 10 Jan 2001 10:53:33.032856 CET)
pike.git/lib/modules/Calendar.pmod/FAQ:233:       The last result here is because the resulting time still will    be as long as the first.      -------------------------------------------------------------------------      Q: Are there other calendars?      A: Yes.    -  Calendar.Day is really a shortcut to Calendar.ISO.Day; -  this is tuned in the localization.h file. +  Calendar.Day is really a shortcut to Calendar.ISO.Day.       There is currently:       Gregorian    This is the base module for Julian style calendars;    despite the name. Most calendars of today are in sync    with the Gregorian calendar.    ISO    This inherits the Gregorian calendar to tweak it to    conform to the ISO standards. Most affected are weeks,
pike.git/lib/modules/Calendar.pmod/FAQ:381:    which I haven't had the time to look into yet, but the    last - Maya - is totally numeric.      -------------------------------------------------------------------------      Q: I don't like that weeks starts on Mondays.    Every school kids knows that weeks start on Sundays.      A: According to the ISO 8601 standard, weeks start on mondays.    -  If you don't like it, edit the Calendar.pmod/localization.h -  file to use the Gregorian calendar instead of the ISO. +  If you don't like it, use Calendar.Gregorian.Day, etc.    -  Or use Calendar.Gregorian.Day, etc. -  +    -------------------------------------------------------------------------      Q: How do I find out which days are red in a specific region?      A: Events.<region>       - contains the events for the region, as a SuperEvent.    You can ask this object to filter out the holidays,       Events.se->holidays();
pike.git/lib/modules/Calendar.pmod/FAQ:417:    Day(Sun 21 Jan 2001),    Day(Sun 28 Jan 2001),    Day(Sat 6 Jan 2001),    Day(Mon 1 Jan 2001)    })      -------------------------------------------------------------------------      Q: How accurate are the events information?    - A: For some regions, very. For most region, not very. + A: For some regions, very. For most regions, not very.       The first reason is lack of information of this kind on    the web, especially sorted into useful rules (like "the    third monday after 23 dec", not "8 jan").       The second reason is lack of time and interest to do    research, which is a rather tedious job.       If you want to help, the check your region in the    events/regions file and send me <mirar+pike@mirar.org> a patch.       Don't send me "the x region is all wrong!" mails without -  telling me how it should look. +  telling me what it should look like.      -------------------------------------------------------------------------      Q: My timezone says it's DST. It's wrong.      A: No it isn't. But:       o The local timezone detector failed to find your timezone by    itself, or found the wrong timezone.       o or you use the wrong timezone.       To make sure the right timezone is used, use the standard    timezone names. Those aren't "CET" or "PST", but    "Europe/Amsterdam" or "America/Dawson".    -  You can tune the default timezone by editing -  Calendar.pmod/localization.h. -  +     OR this may be in the future and you have a changed DST    rule and uses an old Pike. Then you can either download    a new version or download new timezone data files from    the ftp address below (if the internet still is there).      -------------------------------------------------------------------------      Q: The regional events and nameday files are awesome. May I use    them for a project separate from Pike?