PHP Classes

File: example

Recommend this page to a friend!
  Classes of Konstantinos Tsatsarounos   PHP Date Helper   example   Download  
File: example
Role: Example script
Content type: text/plain
Description: example usage
Class: PHP Date Helper
Compute time values relative to the current date
Author: By
Last change:
Date: 11 years ago
Size: 756 bytes
 

Contents

Class file image Download
<?php

$d
= new DateHelper( "Europe/Athens" );
echo
$d->get_current_day( TRUE ).'<br />'; //Get current days name
echo $d->get_current_month( TRUE ).'<br />'; //Get current months name
echo $d->get_current_year().'<br />';
echo
$d->get_current_month_days();
echo
$d->get_month_days( 5 ).'<br />'; //Get fifth month days
echo $d->get_date_before( 0, 0, 0, 5 ).'<br />'; //Get the date 5 days before
echo $d->get_date_after( 0, 0, 0, 5 ).'<br />'; //Get the date 5 days after
echo $d->get_months_days( 5, 10).'<br />'; //Get the number of days from May to October.
echo $d->get_months_days( 5, false, 5).'<br />'; //Get the number of days from May to October.
echo $d->get_months_days( false, 5, 2); //Get the number of days from March to May