public class DateModule extends AbstractQuercusModule
Modifier and Type | Field and Description |
---|---|
static int |
CAL_GREGORIAN |
static int |
CAL_JULIAN |
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
Constructor and Description |
---|
DateModule() |
Modifier and Type | Method and Description |
---|---|
static int |
cal_days_in_month(Env env,
int cal,
int month,
int year)
Returns the days in a given month.
|
static boolean |
checkdate(Env env,
int month,
int day,
int year)
Returns the days in a given month.
|
static DateTime |
date_create(Env env,
Value time,
DateTimeZone dateTimeZone) |
static void |
date_date_set(Env env,
DateTime dateTime,
int year,
int month,
int day) |
static java.lang.String |
date_default_timezone_get(Env env) |
static boolean |
date_default_timezone_set(Env env,
java.lang.String id) |
static DateInterval |
date_diff(Env env,
DateTimeInterface dateA,
DateTimeInterface dateB,
boolean isAbsolute) |
static Value |
date_format(Env env,
DateTime dateTime,
StringValue format) |
static void |
date_isodate_set(Env env,
DateTime dateTime,
int year,
int week,
int day) |
static void |
date_modify(DateTime dateTime,
StringValue modify) |
static long |
date_offset_get(DateTime dateTime) |
static Value |
date_parse(Env env,
StringValue date) |
static ArrayValue |
date_sun_info(long time,
double latitude,
double longitude) |
static Value |
date_sunrise(int timestamp,
int format,
double latitude,
double longitude,
double zenith,
double gmtOffset) |
static Value |
date_sunset(int timestamp,
int format,
double latitude,
double longitude,
double zenith,
double gmtOffset) |
static void |
date_time_set(DateTime dateTime,
int hour,
int minute,
int second) |
static Value |
date_timestamp_get(Env env,
DateTime dateTime) |
static void |
date_timestamp_set(Env env,
DateTime dateTime,
long time) |
static DateTimeZone |
date_timezone_get(Env env,
DateTime dateTime) |
static DateTime |
date_timezone_set(Env env,
DateTime dateTime,
DateTimeZone dateTimeZone) |
StringValue |
date(Env env,
StringValue format,
long time)
Returns the formatted date.
|
protected static StringValue |
dateImpl(Env env,
StringValue format,
long time,
QDate calendar)
Returns the formatted date.
|
static long |
easter_date(Env env,
int year)
Returns the timestamp of easter.
|
static long |
easter_days(Env env,
int year,
int method)
Returns the timestamp of easter.
|
java.util.Map<StringValue,Value> |
getConstMap() |
Value |
getdate(Env env,
Value timeV)
Returns an array of the current date.
|
java.lang.String[] |
getLoadedExtensions()
Returns true for the date extension.
|
Value |
gettimeofday(Env env,
boolean isFloatReturn) |
StringValue |
gmdate(Env env,
StringValue format,
long time)
Returns the formatted date.
|
long |
gmmktime(Env env,
Value hourV,
Value minuteV,
Value secondV,
Value monthV,
Value dayV,
Value yearV)
Returns the formatted date.
|
java.lang.String |
gmstrftime(Env env,
java.lang.String format,
long phpTime)
Returns the formatted date.
|
double |
gregoriantojd(int month,
int day,
int year)
Convert from a gregorian date to a julian day.
|
Value |
idate(Env env,
StringValue format,
long time)
Returns the formatted date as an int.
|
long |
jdtounix(Env env,
double jd)
Convert from a julian day to unix
|
ArrayValue |
localtime(Env env,
long time,
boolean isAssociative)
Returns the time as an indexed or associative array
|
static Value |
microtime(Env env,
boolean getAsFloat)
Returns the time including microseconds
|
long |
mktime(Env env,
Value hourV,
Value minuteV,
Value secondV,
Value monthV,
Value dayV,
Value yearV,
int isDST)
Returns the formatted date.
|
static java.lang.String |
strftime(Env env,
java.lang.String format,
long phpTime)
Returns the formatted date.
|
static Value |
strtotime(Env env,
java.lang.String timeString,
long now)
Parses the time
|
static long |
time(Env env)
Returns the current time in seconds.
|
static ArrayValue |
timezone_abbreviations_list() |
static ArrayValue |
timezone_identifiers_list() |
static Value |
timezone_name_from_abbr(StringValue abbr,
int gmtOffset,
boolean isDST) |
static java.lang.String |
timezone_name_get(DateTimeZone dateTimeZone) |
static long |
timezone_offset_get(DateTimeZone dateTimeZone,
DateTime dateTime) |
static DateTimeZone |
timezone_open(java.lang.String timeZone) |
static Value |
timezone_transitions_get(DateTimeZone dateTimeZone,
int start,
int end) |
addConstant, addConstant, addConstant, getIniDefinitions
public static final int CAL_GREGORIAN
public static final int CAL_JULIAN
public java.lang.String[] getLoadedExtensions()
getLoadedExtensions
in interface QuercusModule
getLoadedExtensions
in class AbstractQuercusModule
public static int cal_days_in_month(Env env, int cal, int month, int year)
public static boolean checkdate(Env env, int month, int day, int year)
public StringValue date(Env env, StringValue format, long time)
public Value idate(Env env, StringValue format, long time)
public static long easter_date(Env env, int year)
public static long easter_days(Env env, int year, int method)
public StringValue gmdate(Env env, StringValue format, long time)
public long gmmktime(Env env, Value hourV, Value minuteV, Value secondV, Value monthV, Value dayV, Value yearV)
public java.lang.String gmstrftime(Env env, java.lang.String format, long phpTime)
public double gregoriantojd(int month, int day, int year)
protected static StringValue dateImpl(Env env, StringValue format, long time, QDate calendar)
public ArrayValue localtime(Env env, long time, boolean isAssociative)
public static Value microtime(Env env, boolean getAsFloat)
public long mktime(Env env, Value hourV, Value minuteV, Value secondV, Value monthV, Value dayV, Value yearV, int isDST)
public static java.lang.String strftime(Env env, java.lang.String format, long phpTime)
public static Value strtotime(Env env, java.lang.String timeString, long now)
public static long time(Env env)
public long jdtounix(Env env, double jd)
public static DateTime date_create(Env env, Value time, DateTimeZone dateTimeZone)
public static void date_date_set(Env env, DateTime dateTime, int year, int month, int day)
public static java.lang.String date_default_timezone_get(Env env)
public static boolean date_default_timezone_set(Env env, java.lang.String id)
public static DateInterval date_diff(Env env, DateTimeInterface dateA, DateTimeInterface dateB, boolean isAbsolute)
public static Value date_format(Env env, DateTime dateTime, StringValue format)
public static void date_isodate_set(Env env, DateTime dateTime, int year, int week, int day)
public static void date_modify(DateTime dateTime, StringValue modify)
public static long date_offset_get(DateTime dateTime)
public static Value date_parse(Env env, StringValue date)
public static ArrayValue date_sun_info(long time, double latitude, double longitude)
public static Value date_sunrise(int timestamp, int format, double latitude, double longitude, double zenith, double gmtOffset)
public static Value date_sunset(int timestamp, int format, double latitude, double longitude, double zenith, double gmtOffset)
public static void date_time_set(DateTime dateTime, int hour, int minute, int second)
public static DateTimeZone date_timezone_get(Env env, DateTime dateTime)
public static DateTime date_timezone_set(Env env, DateTime dateTime, DateTimeZone dateTimeZone)
public static ArrayValue timezone_abbreviations_list()
public static ArrayValue timezone_identifiers_list()
public static Value timezone_name_from_abbr(StringValue abbr, int gmtOffset, boolean isDST)
public static java.lang.String timezone_name_get(DateTimeZone dateTimeZone)
public static long timezone_offset_get(DateTimeZone dateTimeZone, DateTime dateTime)
public static DateTimeZone timezone_open(java.lang.String timeZone)
public static Value timezone_transitions_get(DateTimeZone dateTimeZone, int start, int end)
public java.util.Map<StringValue,Value> getConstMap()
getConstMap
in interface QuercusModule
getConstMap
in class AbstractQuercusModule