Rand Stats

LocalTime

zef:tbrowder

Actions Status Actions Status Actions Status

NAME

LocalTime - A wrapper of class DateTime with varied formatters depending on time zone entry

SYNOPSIS

use LocalTime;

DESCRIPTION

LocalTime is a wrapper class holding an instance of the Raku DateTime class. It was created to either add a local timezone (TZ) abbreviation to a time string or show either none or other TZ information depending on the use (or non-use) of the named variable :tz-abbrev. Following are the formatting effects of the various input conditions:

class DateTime

class LocalTime

Note for US TZ entries the user can enter either '*st' or '*dt' (case insensitive) and the correct form will be used for the time of year. This module is used to good effect in module DateTime::US to get the desired time zone abbreviation in its .to-localtime method.

Currently only US abbreviations are in the 'use'd Timezones::US database, but a future modification will add others (perhaps in other languages also). PRs are welcome!

AUTHOR

Tom Browder tbrowder@acm.org

COPYRIGHT AND LICENSE

© 2022-2024 Tom Browder

This library is free software; you may redistribute or modify it under the Artistic License 2.0.