With our Multilingual Date and Time solution, you never have to deal with the date and time headaches in php again. Let US do all the painful jobs!!!
Features:
Universal Date Format and Time Zone support
- All functions can support multi-format input even in the parameters of one function: System will auto-detect different date formats such as timestamp, SQL date format, date with month in word and the ambiguous date formats.
- User-define ambiguous date format: such as m-d-Y, d-m-Y (separator can be in ’-’, ’.’ or ’/’)
- User pre-defined time zone
Flexibilty
- Support multilingual: All words are in user defined statements for easy translation
- Output format: User can pre-define date and time format of all output or over-ride default format with specific format
Functions
- Auto-detect multiple date formats and convert them to timestamp, SQL Date/time format, or any user defined format
- Calculate length of a time period with 6 precision levels from year upto second and display in user defined language.
- Sort dates in multiple formats and output result in standardized format
- Calculate the difference of 2 dates / times and return the result any of the 5 different units, that is, week, day, hr, min, sec.
(User may also choose to show or ignore negative results.) - Check if a date is fallen within a particular date range, before or after that range
- Extract dates in an array that are fallen within a particular date range and format them in user-defined format
- check number of days in current month or a given month
- check number of days in any month before or after a given month, eg. last month or 2 months later
- check if current year or a given year or the year of a given date is leap year or not
- leap year check of any year before or after a given year or the year of a given date
- Get date or time of timestamp or string in any date/time format
- Get information of any given date, such as day of year, name of day of the week, week number, month and year . User defines names in their own language.
For more details, please refer to http://www.WebExpert-hk.com/en/multilingual-date-time-class
Functions list
- GetStamp($time=’‘)
- GetSQLTime($time=’‘)
- GetDate($time=’’,$format=output_date_format)
- GetTime($time=’’,$format=time_format)
- GetPeriod($fromtime=’’, $totime=’’, $precision = 2)
- GetDiff($fromtime=’’, $totime=’’, $unit=’day’,$shownegative=true)
- CheckRange($chktime=’’, $start=’’, $end=’‘)
- isLeap($time=’’,$offset=0)
- Days_in_month($time=’’,$offset=0)
- GetInfo($time=’’,$type=’weekday’,$num=true,$longname=true)
- GetInrange($dates=array(), $start=’’, $end=’’,$format=output_date_format)
- GetSort($dates=array(), $order=SORT_ASC,$format=output_date_format)
How to Use
1. Declare the PowerDateTime class with:
require(‘multilingual_date_time_class.php’);
2 There are 2 ways to call the function. Please see below examples:
i) MDT ::GetSQLTime($yourdateinfo)
ii) $a = new MDT
echo $a->GetSQLTime($yourdateinfo)
Please refer to the code file for more descriptions.
For more examples, please refer to http://www.WebExpert-hk.com/en/multilingual-date-time-class