#!/usr/bin/perl
# -*- encoding: utf-8; indent-tabs-mode: nil -*-
#
#     Example of Date::Convert::French_Rev script to print the date in
#     French Revolutionary format.
#     Copyright (C) 2001-2003, 2013, 2015, 2020 Jean Forget
#
#     See the license in the embedded documentation below.
#

# Check the shebang line and then just call this script from your .profile

use utf8;
use strict;
use warnings;
use Date::Convert::French_Rev;

binmode STDOUT, ':utf8';

my ($y, $m, $d) = (localtime())[5, 4, 3];
my $day =  Date::Convert::Gregorian->new($y + 1900, $m + 1, $d);
print "Gregorian: ", $day->date_string(), "\n";

Date::Convert::Julian->convert($day);
print "Julian: ", $day->date_string(), "\n";

Date::Convert::Hebrew->convert($day);
print "Hebrew: ", $day->date_string(), "\n";

Date::Convert::French_Rev->convert($day);
print $day->date_string("French Revolutionary: %A %d %B %EY, %Ej%n");

__END__

=encoding utf8

=head1 NAME

today - Print the current date in various calendars.

=head1 SYNOPSIS

  today

=head1 DESCRIPTION

This program prints the current  date in Gregorian, Julian, Hebrew and
French Revolutionary calendar.

=head1 OPTIONS

None.

=head1 AUTHOR

Jean Forget <JFORGET@cpan.org>

=head1 LICENSE

Copyright  (c) 2001,  2002, 2003,  2013, 2015,  2020 Jean  Forget. All
rights reserved.  This program is  free software. You  can distribute,
modify, and otherwise mangle F<g2r_table> under the same terms as Perl
5.16.3:  GNU Public  License  version  1 or  later  and Perl  Artistic
License

You can  find the text  of the licenses  in the F<LICENSE> file  or at
L<https://dev.perl.org/licenses/artistic.html>
and L<https://www.gnu.org/licenses/gpl-1.0.html>.

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., L<https://www.fsf.org>.

=cut


