Oxford::Calendar(3pm) | User Contributed Perl Documentation | Oxford::Calendar(3pm) |
Oxford::Calendar - University of Oxford calendar conversion routines
use 5.10.0; use Oxford::Calendar; use Date::Calc; say "Today is " . Oxford::Calendar::ToOx(reverse Date::Calc::Today);
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
<https://www.admin.ox.ac.uk/examregs/2015-16/rotnalengofterm/>
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/facts-and-figures/dates-of-term>.
or the authoritative source, the Gazette, available online from
<http://www.ox.ac.uk/gazette/>.
<http://www.ox.ac.uk/news-and-events/The-University-Year> describes the academic year at Oxford.
An Oxford academic date has the following format:
where term name is one of
Example:
Friday, 8th Week, Michaelmas 2007
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:
This is currently the default behaviour, for backwards compatibility with previous releases; this may be changed in future.
Note: these are the statutory term dates, not full term dates.
This function is experimental.
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 may be browsed and submitted at
<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>
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 maintains this module (between 2008 and 2015 for IT Services, University of Oxford).
2020-06-06 | perl v5.30.3 |