Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ddate(1) [linux man page]

DDATE(1)						     Emperor Norton Utilities							  DDATE(1)

NAME
ddate - converts Gregorian dates to Discordian dates SYNOPSIS
ddate [+format] [date] DESCRIPTION
ddate prints the date in Discordian date format. If called with no arguments, ddate will get the current system date, convert this to the Discordian date format and print this on the stan- dard output. Alternatively, a Gregorian date may be specified on the command line, in the form of a numerical day, month and year. If a format string is specified, the Discordian date will be printed in a format specified by the string. This mechanism works similarly to the format string mechanism of date(1), only almost completely differently. The fields are: %A Full name of the day of the week (i.e., Sweetmorn) %a Abbreviated name of the day of the week (i.e., SM) %B Full name of the season (i.e., Chaos) %b Abbreviated name of the season (i.e., Chs) %d Ordinal number of day in season (i.e., 23) %e Cardinal number of day in season (i.e., 23rd) %H Name of current Holyday, if any %N Magic code to prevent rest of format from being printed unless today is a Holyday. %n Newline %t Tab %X Number of days remaining until X-Day. (Not valid if the SubGenius options are not compiled in.) %{ %} Used to enclose the part of the string which is to be replaced with the words "St. Tib's Day" if the current day is St. Tib's Day. %. Try it and see. EXAMPLES
% ddate Sweetmorn, Bureaucracy 42, 3161 YOLD % ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H' Today is Sweetmorn, the 42nd of Bureaucracy, 3161. % ddate +"It's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 26 9 1995 It's Prickle-Prickle, the 50th of Bureaucracy, 3161. Celebrate Bureflux % ddate +"Today's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 29 2 1996 Today's St. Tib's Day, 3162. BUGS
ddate(1) will produce undefined behavior if asked to produce the date for St. Tib's day and its format string does not contain the St. Tib's Day delimiters %{ and %}. NOTE
After `X-Day' passed without incident, the Church of the SubGenius declared that it had got the year upside down - X-Day is actually in 8661 AD rather than 1998 AD. Thus, the True X-Day is Cfn 40, 9827. AUTHOR
Original program by Druel the Chaotic aka Jeremy Johnson (mpython@gnu.ai.mit.edu) Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak (acb@dev.null.org) Five tons of flax. DISTRIBUTION POLICY
Public domain. All rites reversed. SEE ALSO
date(1), http://www.subgenius.com/ Malaclypse the Younger, Principia Discordia, Or How I Found Goddess And What I Did To Her When I Found Her AVAILABILITY
The ddate command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. 59 Bureaucracy 3161 DDATE(1)

Check Out this Related Man Page

Oxford::Calendar(3pm)					User Contributed Perl Documentation				     Oxford::Calendar(3pm)

NAME
Oxford::Calendar - University of Oxford calendar conversion routines SYNOPSIS
use 5.10.0; use Oxford::Calendar; use Date::Calc; say "Today is " . Oxford::Calendar::ToOx(reverse Date::Calc::Today); DESCRIPTION
This module converts University of Oxford dates (Oxford academic dates) to and from Real World dates, and provides information on Terms of the University. The Terms of the University are defined by the Regulations on the number and lengths of terms, available online from http://www.admin.ox.ac.uk/examregs/03-00_REGULATIONS_ON_THE_NUMBER_AND_LENGTH_OF_TERMS.shtml <http://www.admin.ox.ac.uk/examregs/03-00_REGULATIONS_ON_THE_NUMBER_AND_LENGTH_OF_TERMS.shtml> This document describes the start and end dates of Oxford Terms. In addition to this, the dates of Full Term, required to calculate the week number of the term, are prescribed by Council, and published periodically in the University Gazette. Full term comprises weeks 1-8 inclusive, but sometimes, dates outside of full term are presented in the Oxford academic date format. This module will optionally provide such dates. Data for these prescribed dates may be supplied in the file /etc/oxford-calendar.yaml; if this file does not exist, built-in data will be used. The built-in data is periodically updated from the semi-authoritative source at <http://www.ox.ac.uk/about_the_university/university_year/dates_of_term.html>. or the authoritative source, the Gazette, available online from <http://www.ox.ac.uk/gazette/>. <http://www.ox.ac.uk/about_the_university/university_year/index.html> describes the academic year at Oxford. DATE FORMAT
An Oxford academic date has the following format: <day of week>, <week number>[st,nd,rd,th] week, <term name> <year> where term name is one of o Michaelmas (autumn) o Hilary (spring) o Trinity (summer) Example: Friday, 8th Week, Michaelmas 2007 FUNCTIONS
ToOx($day, $month, $year, [\%options]) Given a day, month and year in standard human format (that is, month is 1-12, not 0-11, and year is four digits) will return a string of the form Day, xth week, Term year or an array (Day, week of term, Term, year) depending on how it is called. The exact behaviour is modified by the 'mode' option described below. If the requested date is not in full term or extended term (see below), undef will be returned. If the requested date is not covered by the database, ToOx will die with an "out of range" error message. Therefore it is recommended to eval ToOx with appropriate error handling. %options can contain additional named parameter options: mode Several modes are available: full_term Term dates will only be returned if the date requested is part of a full term (as defined by the web page above). ext_term Term dates will only be returned if the date requested is part of an extended term, or statutory term. nearest Will return term dates based on the nearest term, even if the date requested is not part of an extended term (i.e. will include fictional week numbers). This is currently the default behaviour, for backwards compatibility with previous releases; this may be changed in future. confirmed If true, ignores dates marked as provisional in the database. ThisTerm($year, $month, $day) Given a year, month, term in standard human format (that is, month is 1-12, not 0-11, and year is four digits) will returns the current term or undef if in vacation or unknown. The term is given as an array in the form (year, term). NextTerm($year, $month, $day) Given a day, month and year in standard human format (that is, month is 1-12, not 0-11, and year is four digits) will return the next term (whether or not the date given is in term time). The term is given as an array in the form (year, term). StatutoryTermDates($year) Returns a hash reference keyed on terms for a given year, the value of each being a hash reference containing start and end dates for that term. The dates are stored as array references containing numeric year, month, day values. Note: these are the statutory term dates, not full term dates. Parse($string) Takes a free-form description of an Oxford calendar date, and attempts to divine the expected meaning. If the name of a term is not found, the current term will be assumed. If the description is unparsable, undef is returned. Otherwise, an array will be returned of the form "($year,$term,$week,$day)". This function is experimental. FromOx($year, $term, $week, $day) Converts an Oxford date into a Gregorian date, returning a string of the form "DD/MM/YYYY" or undef. The arguments are of the same format as returned by ToOx in array context; that is, a four-digit year, the name of the term, the week number, and the name of the day of week (e.g. 'Sunday'). If the requested date is not covered by the database, FromOx will die with an "out of range" error message. Therefore it is recommended to eval ToOx with appropriate error handling. BUGS
Bugs may be browsed and submitted at http://rt.cpan.org/Public/Dist/Display.html?Name=Oxford-Calendar <http://rt.cpan.org/Public/Dist/Display.html?Name=Oxford-Calendar> A copy of the maintainer's git repository may be found at https://github.com/jmdh/Oxford-Calendar <https://github.com/jmdh/Oxford-Calendar> AUTHOR
Simon Cozens is the original author of this module. Eugene van der Pijll, "pijll@cpan.org" took over maintenance from Simon for a time. Dominic Hargreaves currently maintains this module for the Computing Services, University of Oxford. perl v5.14.2 2012-06-26 Oxford::Calendar(3pm)
Man Page