28 Jan 2019 18:27:54 UTC
- Distribution: DateTime-Format-Roman
- Module version: 0.04
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (342 / 0 / 0)
- KwaliteeBus factor: 2
- 92.86% Coverage
- License: perl_5
- Perl: v5.6.1
- Download (13.07KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
DateTime::Format::Roman - Roman day numbering for DateTime objects
use DateTime::Format::Roman; my $formatter = DateTime::Format::Roman->new( pattern => '%d %f %b %y' ); my $dt = DateTime->new( year => 2003, month => 5, day => 28 ); $formatter->format_datetime($dt); # '5 Kal Jun 2003'
This module formats dates in the Roman style.
The Romans expressed their dates in relation to three fixed dates per month. For example: the Ides of March was the 15th of that month; 14 March was called "2 Ides", 13 March was called "3 Ides", etcetera. The days in the second half of the month were named after the first day of the next month, the "Kalends"; e.g. 16 March was called "17 Kalends of April".
new( pattern => $string )
Creates a new formatter object. The optional formatting pattern defines the format of the output of format_datetime(). If no formatting pattern is given, a reasonable default is used.
Retruns the formatted string. This method can be called on a formatter object (created by new()), or it can be called as a class method. In the latter case, the default pattern is used.
The following specifiers are allowed in the format strings given to the new() method:
The abbreviated month name.
The full month name.
The day of the month as a decimal number (including '1' for the fixed days).
The day of the month, written as a number plus the corresponding fixed day.
The 'fixed day' part of the date.
The month as a decimal number (range 1 to 12).
The year as a decimal number.
If a specifier is preceded by 'O' or 'o', numbers will be written in uppercase and lowercase Roman numerals, respectively.
The %f specifier accepts an additional argument of 1 digit, specifying the length of the output:
%0f : abbreviated name (e.g. "Kal") %1f : full name (e.g. "Kalends") %2f : one-letter abbreviation (e.g. "K")
Support for this module is provided via the firstname.lastname@example.org email list. See https://lists.perl.org/ for more details.
Note that this is a beta release. The interface *will* change, especially the format specifiers, and the way the "fixed days" are returned.
First author: Eugene van der Pijll <email@example.com>
First co-maintainer: Dave Rolsky <firstname.lastname@example.org>
Second co-maintainer: Jean Forget <JFORGET@cpan.org>
Copyright (c) 2003, 2004, 2018, 2019 Eugene van der Pijll, Dave Rolsky and Jean Forget. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed under the same terms as Perl 5.28.0: GNU Public License version 1 or later and Perl Artistic License
Here is the summary of GPL:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <https://www.gnu.org/licenses/> or write to the Free Software Foundation, Inc., https://fsf.org.
email@example.com mailing list
Module Install Instructions
To install DateTime::Format::Roman, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install DateTime::Format::Roman
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|