Class JavaDateFactory
- All Implemented Interfaces:
DateFactory
- Author:
- brian zimmer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDate
(int year, int month, int day) This function constructs an object holding a date value.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).Time
(int hour, int minute, int second) This function constructs an object holding a time value.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).Timestamp
(int year, int month, int day, int hour, int minute, int second) This function constructs an object holding a time stamp value.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).
-
Constructor Details
-
JavaDateFactory
public JavaDateFactory()
-
-
Method Details
-
Date
This function constructs an object holding a date value.- Specified by:
Date
in interfaceDateFactory
- Parameters:
year
- to setmonth
- to setday
- to set- Returns:
- date as PyObject
-
Time
This function constructs an object holding a time value.- Specified by:
Time
in interfaceDateFactory
- Parameters:
hour
- to setminute
- to setsecond
- to set- Returns:
- time as PyObject
-
Timestamp
This function constructs an object holding a time stamp value.- Specified by:
Timestamp
in interfaceDateFactory
- Parameters:
year
- to setmonth
- to setday
- to sethour
- to setminute
- to setsecond
- to set- Returns:
- time stamp as PyObject
-
DateFromTicks
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.
- Specified by:
DateFromTicks
in interfaceDateFactory
- Parameters:
ticks
- number of seconds since the epoch- Returns:
- PyObject
-
TimeFromTicks
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.
- Specified by:
TimeFromTicks
in interfaceDateFactory
- Parameters:
ticks
- number of seconds since the epoch- Returns:
- PyObject
-
TimestampFromTicks
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.
- Specified by:
TimestampFromTicks
in interfaceDateFactory
- Parameters:
ticks
- number of seconds since the epoch- Returns:
- PyObject
-