PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TDateTimeStamp

TDateTimeStamp Class

TDateTimeStamp Class is a wrapper to DateTime: http://php.net/manual/book.datetime.php Prado implemented this class before php started shipping the DateTime extension. This class is deprecated and left here only for compatibility for legacy code. Please note that this class doesn't support automatic conversion from gregorian to julian dates anymore.

Package: System\Util
Deprecated: since 3.2.1
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Fabio Bas ctrlaltca[AT]gmail[DOT]com
Since: 3.0.4
Located at Util/TDateTimeStamp.php
Methods summary
public
# getDayofWeek( integer $year, integer $month, integer $day )

Returns the day of the week (0=Sunday, 1=Monday, .. 6=Saturday)

Returns the day of the week (0=Sunday, 1=Monday, .. 6=Saturday)

Parameters

$year
integer
year
$month
integer
month
$day
integer
day
public boolean
# isLeapYear( float $year )

Checks for leap year, returns true if it is. No 2-digit year check. Also handles julian calendar correctly.

Checks for leap year, returns true if it is. No 2-digit year check. Also handles julian calendar correctly.

Parameters

$year
float
year to check

Returns

boolean
true if is leap year
protected integer
# digitCheck( mixed $y )

Fix 2-digit years. Works for any century. Assumes that if 2-digit is more than 30 years in future, then previous century.

Fix 2-digit years. Works for any century. Assumes that if 2-digit is more than 30 years in future, then previous century.

Returns

integer
change two digit year into multiple digits
public
# get4DigitYear( mixed $y )
public integer
# getGMTDiff( mixed $ts = false )

Returns

integer
get local time zone offset from GMT
public array
# parseDate( mixed $txt = false )

Returns

array
an array with date info.
public array
# getDate( mixed $d = false, mixed $fast = false )

Returns

array
an array with date info.
public boolean
# isValidDate( mixed $y, mixed $m, mixed $d )

Returns

boolean
true if valid date, semantic check only.
public string
# formatDate( mixed $fmt, mixed $ts = false, mixed $is_gmt = false )

Returns

string
formatted date based on timestamp $d
public integer|float
# getTimeStamp( mixed $hr, mixed $min, mixed $sec, mixed $mon = false, mixed $day = false, mixed $year = false, mixed $is_gmt = false )

Returns

integer|float
a timestamp given a local time
Properties summary
protected static array $_month_normal array("",31,28,31,30,31,30,31,31,30,31,30,31)
#
protected static array $_month_leaf array("",31,29,31,30,31,30,31,31,30,31,30,31)
#
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO