GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Astro::App::Satpass2::FormatTime::DateTime::Cldr(3) User Contributed Perl Documentation Astro::App::Satpass2::FormatTime::DateTime::Cldr(3)

Astro::App::Satpass2::FormatTime::DateTime::Cldr - Format time using DateTime->format_cldr()

 use Astro::App::Satpass2::FormatTime::DateTime::Cldr;
 my $tf = Astro::App::Satpass2::FormatTime::DateTime::Cldr->new();
 print 'It is now ',
     $tf->format_datetime( 'HH:mm:SS', time, 1 ),
     " GMT\n";

This class and its subclasses are private to the Astro::App::Satpass2 package. The author reserves the right to add, change, or retract functionality without notice.

This subclass of Astro::App::Satpass2::FormatTime::DateTime formats times using "DateTime->format_cldr()". Time zones other than the default local zone are handled using DateTime::TimeZone objects.

All this class really provides is the interface to "DateTime->format_cldr()". Everything else is inherited.

As an enhancement (I hope!) to the DateTime "cldr" functionality, this module, before calling "format_cldr()", finds all embedded literals and calls Astro::App::Satpass2::FormatTime::DateTime __preprocess_strftime_format() to expand them. This provides special-case things like '%{calendar_name}' and the results of DateTime method calls, plus some control over formatting.

Use of this formatter with Julian dates enabled (i.e. with DateTime::Calendar::Christian doing the heavy lifting) is unsupported, because DateTime::Calendar::Christian lacks some of the methods you might want it to have, including "format_cldr()" itself. This package checks for the following methods when it loads DateTime::Calendar::Christian, and patches them in if they are not there:

    christian_era()
    era()
    era_abbr()
    era_name()
    format_cldr()
    secular_era()
    year_with_era()
    year_with_christian_era()
    year_with_secular_era()

This is unsupported not only because it is tinkering with somebody else's name space, but because the patches rely on knowing the internals of DateTime::Calendar::Christian, which may change without warning. Caveat coder.

This class provides no public methods over and above those provided by Astro::App::Satpass2::FormatTime::DateTime and Astro::App::Satpass2::FormatTime::Strftime.

Support is by the author. Please file bug reports at <https://rt.cpan.org/Public/Dist/Display.html?Name=Astro-App-Satpass2>, <https://github.com/trwyant/perl-Astro-App-Satpass2/issues>, or in electronic mail to the author.

Thomas R. Wyant, III wyant at cpan dot org

Copyright (C) 2010-2021 by Thomas R. Wyant, III

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

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.

2021-11-04 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.