PHP Classes

File: readme.txt

Recommend this page to a friend!
  Classes of zinsou A.A.E.Mose   Incredible Timestamp   readme.txt   Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: readme
Class: Incredible Timestamp
Compute the seconds elapsed since the year 0
Author: By
Last change:
Date: 5 years ago
Size: 1,511 bytes
 

Contents

Class file image Download
IncredibleTimestamp class is powerful class to compute the time in seconds elapsed from year 0 to any date and time of your choice,in other words since Jesus-christ birth as it is the starting point for our actual calendar to your chosen datetime. The package contains a method to convert unix timestamp to IncredibleTimestamp: UnixtoIncTimestamp($x) $x must be a numeric The class constructor: public function __construct($date=false){ $date must be a date and time formatted as array(year,month,day,hour,min,sec) example: array(2017,12,31,00,1,59); if your array is not full the class will complete it itself example: array(2017) will return always (2017,1,1,0,0,0); if your array has more than six elements the class will reduce it itself example: array(2017,1,1,0,0,0,2,5,7) will return always (2017,1,1,0,0,0); if you don't specify a date the class will automatically return the date and the time of the day if the day is before 19-01-2038 04:00:00 else it will return the 01-01-0000 00:00:00 } The class contains except the constructor, three methods: -Two getters: *public Inctimestamp() return the incredible timestamp *public IncTimestamptoUnix() convert the incredible timestamp to unix timestamp -and one setter *public Timestamp () compute the incredible timestamp and assign it to the protected property timestamp. See the testInc.php file for example of how to use. This script is too short to provide more documentation. Contact at leizmo@gmail.com