PHP Classes

ubDate: Add or subtract time intervals from dates

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 290 All time: 7,498 This week: 660Up
Version License PHP version Categories
ubdate 1.0Freeware5.0PHP 5, Time and Date
Description 

Author

This class can be used to add or subtract time intervals from dates.

It can take a given date and time and subtract a time interval in seconds, minutes, days, months or years.

The class can also determine the day of the week of the resulting date in a given language.

Picture of Reynier Blanco
Name: Reynier Blanco <contact>
Classes: 6 packages by
Country: Cuba Cuba
Age: 38
All time rank: 19493 in Cuba Cuba
Week rank: 321 Up1 in Cuba Cuba Up

Details

This class allows to model the date giving the possibility to carry out operations like: to add or subtract => day, month, year ,hour ,minute, second ,etc It's possible to change the language to obtain the days of the week and the months alone for english and spanish at now. when he/she wants himself to create an object of the class he/she is passed a chain with the date in a format determined by you. Ex: date = "05/16/2008 15:06:03" format = "m/d/Y h:i:s" The possible characters to use in the format are: Day --- --- d Day of the month, 2 digits with leading zeros 01 a 31 j Day of the month without leading zeros 1 to 31 Month --- --- m Numeric representation of a month, with leading zeros 01 through 12 n Numeric representation of a month, without leading zeros 1 through 12 Year --- --- Y A full numeric representation of a year, 4 digits Examples: 1999 or 2003 y A two digit representation of a year Examples: 99 or 03 Hour --- --- B Swatch Internet time 000 through 999 g 12-hour format of an hour without leading zeros 1 through 12 G 24-hour format of an hour without leading zeros 0 through 23 h 12-hour format of an hour with leading zeros 01 through 12 H 24-hour format of an hour with leading zeros 00 through 23 Minute --- --- i Minutes with leading zeros 00 to 59 Second --- --- s Seconds, with leading zeros 00 through 59

  Files folder image Files  
File Role Description
Accessible without login Plain text file index.php Example example
Accessible without login Plain text file readme.txt Doc. readme
Plain text file see.php Class Assistant Class
Plain text file ubdate.php Class Main Class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:290
This week:0
All time:7,498
This week:660Up
User Comments (1)
the example seems broken
15 years ago (max costa)
75%StarStarStarStar