com.ziclix.python.sql
Class JavaDateFactory
java.lang.Object
com.ziclix.python.sql.JavaDateFactory
- DateFactory
public class JavaDateFactory
extends java.lang.Object
Produce java.[util|sql] type dates.
- brian zimmer
- last revised by $Author: bzimmer $
PyObject | Date(int year, int month, int day) - This function constructs an object holding a date value.
|
PyObject | DateFromTicks(long ticks) - This function constructs an object holding a date value from the
given ticks value (number of seconds since the epoch; see the
documentation of the standard Python time module for details).
|
PyObject | Time(int hour, int minute, int second) - This function constructs an object holding a time value.
|
PyObject | TimeFromTicks(long ticks) - This function constructs an object holding a time value from the
given ticks value (number of seconds since the epoch; see the
documentation of the standard Python time module for details).
|
PyObject | Timestamp(int year, int month, int day, int hour, int minute, int second) - This function constructs an object holding a time stamp value.
|
PyObject | TimestampFromTicks(long ticks) - This function constructs an object holding a time stamp value from
the given ticks value (number of seconds since the epoch; see the
documentation of the standard Python time module for details).
|
Date
public PyObject Date(int year,
int month,
int day)
This function constructs an object holding a date value.
- Date in interface DateFactory
DateFromTicks
public PyObject DateFromTicks(long ticks)
This function constructs an object holding a date value from the
given ticks value (number of seconds since the epoch; see the
documentation of the standard Python
time module for details).
Note: The DB API 2.0 spec calls for time in seconds since the epoch
while the Java Date object returns time in milliseconds since the epoch.
This module adheres to the python API and will therefore use time in
seconds rather than milliseconds, so adjust any Java code accordingly.
- DateFromTicks in interface DateFactory
ticks
- number of seconds since the epoch
Time
public PyObject Time(int hour,
int minute,
int second)
This function constructs an object holding a time value.
- Time in interface DateFactory
TimeFromTicks
public PyObject TimeFromTicks(long ticks)
This function constructs an object holding a time value from the
given ticks value (number of seconds since the epoch; see the
documentation of the standard Python
time module for details).
Note: The DB API 2.0 spec calls for time in seconds since the epoch
while the Java Date object returns time in milliseconds since the epoch.
This module adheres to the python API and will therefore use time in
seconds rather than milliseconds, so adjust any Java code accordingly.
- TimeFromTicks in interface DateFactory
ticks
- number of seconds since the epoch
Timestamp
public PyObject Timestamp(int year,
int month,
int day,
int hour,
int minute,
int second)
This function constructs an object holding a time stamp value.
- Timestamp in interface DateFactory
year
- month
- day
- hour
- minute
- second
-
TimestampFromTicks
public PyObject TimestampFromTicks(long ticks)
This function constructs an object holding a time stamp value from
the given ticks value (number of seconds since the epoch; see the
documentation of the standard Python
time module for details).
Note: The DB API 2.0 spec calls for time in seconds since the epoch
while the Java Date object returns time in milliseconds since the epoch.
This module adheres to the python API and will therefore use time in
seconds rather than milliseconds, so adjust any Java code accordingly.
- TimestampFromTicks in interface DateFactory
ticks
- number of seconds since the epoch
Jython homepage