Changes for version 0.000_013 - 2017-02-21

  • Rename __*_short() to __*_abbr(). No idea why I thought _short was better.
  • Update README and module front matter.
  • Expose __valid_date_class() This is the validator for an object passed as a date to __format(). It is exposed for troubleshooting purposes.
  • Add tools/valid-date-class. This is an author's diagnostic to determine whether the perl package being analyzed has the methods it needs to be passed to the __format() subroutine as a date object.

Changes for version 0.000_012 - 2017-02-20

  • NOT released to CPAN
  • Modify methods expected by __format in date object. Instead of year(), month(), day(), holiday(), and weekday() (or day_of_week()), it is year_number(), etcetera. The motiviation was the equivocation between Date::Tolkien::Shire and DateTime::Fiction::JRRTolkien::Shire on some of these.
  • Ditch the locale code as a bad idea. Instead, go with accented() and traditional() methods on the date object used by __format().
  • Fix minor bug in holiday handling in __format().

Changes for version 0.000_011 - 2017-02-18

  • NOT released to CPAN
  • Recode the building of name-to-number hashes so that no hand-tweaking is needed.
  • __year_day_to_rata_die() now takes negative years. The validation mistakenly required non-negative years.

Changes for version 0.000_010 - 2017-02-18

  • NOT released to CPAN
  • Redo __format() in terms of opaque Locale object.
  • Add __locale() to manufacture this object.
  • Correct accents in on_date_accented() text.
  • Remove formats '%EA', '%Ea', and '%ED'. On thinking about it, these seem to me to be more a locale thing, though how I will get locales into this package is beyond me at the moment.
  • Add rudimentary argument validation. The incentive is that I might want to bolt on a locale system to DateTime::Fiction::JRRTolkien::Shire, and that might (or might not) involve adding arguments. So I want to flag extra arguments now, to reserve them for myself later.

Changes for version 0.000_009 - 2017-02-15

  • Ditch special-case __format() code for '%N'. With the implementation of Glibc field widths, this can now just go through normal numeric processing, and (I hope) quash an error found by Andreas König's smoker.
  • Converge __format() toward Glibc extensions:
  • Add user-specified field width.
  • Add '0', '_', and '-' padding flags.
  • Add '^' and '#' case-change flags.
  • Unrecognized specifications are left as-is, except for the actions of flags. So '%.' remains '%.', rather than becoming '.' as the BSD functionality would have it. And '%Ez' remains '%Ez' rather than being interpreted the same as '%z'. But '%^Ez' becomes '%^EZ', which looks like a bug to me, but that's what Glibc strftime() does.
  • Use '%-e' in the implementation of '%Ex', to mimic better the historical output of (e.g.) Date::Tolkien::Shire->on_date().
  • Add '%v' (OK, that's a BSD extension, but I could not resist).

Changes for version 0.000_008 - 2017-02-14

  • Change __format() format %ED to do __on_date_accented(). The previous functionality of %ED is obtained (for both %ED and %Ed) by putting %En before. This causes %ED and %Ed to add a leading "\n", but only if their result is defined.
  • Have __format() interpret { month = >0, day => number } as being equivalent to { holiday => number }, when invoked with a hash rather than an object.
  • Add eg/on-date option -accented, which gives you accented proper nouns.

Changes for version 0.000_007 - 2017-02-13

  • First CPAN release.
  • Add __on_date_accented(). This subroutine wraps __on_date(), but returns proper nouns accented as they are in The Lord Of The Rings.

Changes for version 0.000_006 - 2017-02-10

  • Clean up eg/ scripts.
  • Add __format format %ED, for on_date() support. This is like %Ed, but a leading "\n" is added if the result is not null. This means the usual on_date() method can be duplicated by __format( $date, '%Ex%n%ED' );

Changes for version 0.000_005 - 2017-02-08

  • Add __holiday_name_to_number() and __month_name_to_number(). These convert a holiday name to a holiday number and a month name to a month number respectively. Numeric arguments are simply returned. Unrecognized arguments return 0.
  • Remove creeping 5.8-isms, so that we actually work under 5.6.2.

Changes for version 0.000_004 - 2017-02-07

  • Correct __rata_die_to_year_day(). Also test it more exhaustively (if author) or at least in a more targeted manner (if not).
  • Also correct GREGORIAN_RATA_DIE_TO_SHIRE, using a better-thought-out computation.

Changes for version 0.000_003 - 2017-02-06

  • Remove Shire-related constant from __year_day_to_rata_die() and __rata_die_to_year_day(). This way they can be used on any calendar having the Gregorian year-length rules.
  • Added exportable manifest constant GREGORIAN_RATA_DIE_TO_SHIRE to convert from "true" (Gregorian-based) Rata Die to Shire Rata Die.

Changes for version 0.000_002 - 2017-02-06

  • Have subroutines return 0 or '' as appropriate (meaning, for legal dates to which they do not apply, e.g. month-related stuff on a holiday).
  • Simplify __format conversion code. This mostly means things like %m on a holiday producing '00', though it also means requiring a day_of_week() method on the object passed in. This method was added to the hash wrapper, implemented by constructing a {day_of_week} entry if one did not already exist.

Changes for version 0.000_001 - 2017-02-05

  • Initial version.

Modules

Data functionality for Shire calendars.