houseabsolute / DateTime-TimeZone

Time zone object base class and factory
https://metacpan.org/release/DateTime-TimeZone/
Other
9 stars 25 forks source link

doc: DateTime::TimeZone::Floating short_name_for_datetime inconsistent with documentation #24

Closed zmughal closed 6 years ago

zmughal commented 6 years ago
$ perl -MDateTime::TimeZone::Floating \
    -E 'say DateTime::TimeZone::Floating->new->short_name_for_datetime'
floating

From Usage section at Floating.pm@v2.15

This class has the same methods as a real time zone object, but the
C<short_name_for_datetime()>, and C<category()> methods both return
undef.

Is it supposed to be 'floating' or undef? The tests seem to all be using 'floating'.

autarch commented 6 years ago

I think we have to go with the code here. I'll fix the docs.

autarch commented 6 years ago

Thanks for the bug report, btw!

zmughal commented 6 years ago

No problem!

I noticed some small grammar fixes that can be applied on top of the doc fix:

diff --git a/lib/DateTime/TimeZone/Floating.pm b/lib/DateTime/TimeZone/Floating.pm
index f45efcf..64205c8 100644
--- a/lib/DateTime/TimeZone/Floating.pm
+++ b/lib/DateTime/TimeZone/Floating.pm
@@ -62,7 +62,7 @@ A floating time has no time zone, and has an effective offset of zero.
 =head1 USAGE

 This class has the same methods as a real time zone object. The
-C<short_name_for_datetime()> return the string "floating" and the and
+C<short_name_for_datetime()> method returns the string "floating" and the
 C<category()> method returns C<undef>.

 =cut
autarch commented 6 years ago

Thanks, fixed those too.