| 1 |
#! /usr/bin/php |
| 2 |
<?php |
| 3 |
|
| 4 |
# hdate_php.php |
| 5 |
# example file for libhdate. |
| 6 |
# |
| 7 |
|
| 8 |
# |
| 9 |
# run: php hdate_php.php |
| 10 |
# |
| 11 |
|
| 12 |
# |
| 13 |
# Copyright (C) 2008 Yaacov Zamir <[email protected]> |
| 14 |
# |
| 15 |
# This program is free software: you can redistribute it and/or modify |
| 16 |
# it under the terms of the GNU General Public License as published by |
| 17 |
# the Free Software Foundation, either version 3 of the License, or |
| 18 |
# (at your option) any later version. |
| 19 |
# |
| 20 |
# This program is distributed in the hope that it will be useful, |
| 21 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 |
# GNU General Public License for more details. |
| 24 |
# |
| 25 |
# You should have received a copy of the GNU General Public License |
| 26 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 27 |
# |
| 28 |
|
| 29 |
require ("hdate.php"); |
| 30 |
|
| 31 |
# Create a new Hdate object |
| 32 |
$h = new Hdate(); |
| 33 |
|
| 34 |
# Print gregorian date |
| 35 |
echo "Today is:\n"; |
| 36 |
echo $h->get_gday().".".$h->get_gmonth().",".$h->get_gyear()."\n"; |
| 37 |
|
| 38 |
# Print hebrew date: 0 - long format |
| 39 |
echo $h->get_format_date(0)."\n"; |
| 40 |
|
| 41 |
?> |