Joda Time API

org.joda.time.buddhist
Class BuddhistDateTime

java.lang.Object
  |
  +--org.joda.time.AbstractInstant
        |
        +--org.joda.time.DateTime
              |
              +--org.joda.time.buddhist.BuddhistDateTime
All Implemented Interfaces:
java.lang.Comparable, ReadableInstant, java.io.Serializable

public final class BuddhistDateTime
extends DateTime

BuddhistTimeOnly is the basic implementation of a datetime class using the BuddhistChronology. It holds the time as milliseconds from the Epoch of 1970-01-01T00:00:00Z.

Author:
Stephen Colebourne, Brian S O'Neill
See Also:
Serialized Form

Constructor Summary
BuddhistDateTime()
          Constructs a BuddhistDateTime to the current datetime, as reported by the system clock.
BuddhistDateTime(java.util.Calendar calendar)
          Constructs a BuddhistDateTime from a Calendar.
BuddhistDateTime(java.util.Calendar calendar, DateTimeZone zone)
          Constructs a BuddhistDateTime from a Calendar.
BuddhistDateTime(java.util.Date date)
          Constructs a BuddhistDateTime from a Date.
BuddhistDateTime(java.util.Date date, DateTimeZone zone)
          Constructs a BuddhistDateTime from a Date.
BuddhistDateTime(DateTimeZone zone)
          Constructs a BuddhistDateTime to the current datetime, as reported by the system clock.
BuddhistDateTime(long millis)
          Constructs a BuddhistDateTime set to the milliseconds from 1970-01-01T00:00:00Z.
BuddhistDateTime(long millis, DateTimeZone zone)
          Constructs a BuddhistDateTime set to the milliseconds from 1970-01-01T00:00:00Z.
BuddhistDateTime(ReadableInstant instant)
          Constructs a BuddhistDateTime from a ReadableInstant.
BuddhistDateTime(ReadableInstant instant, DateTimeZone zone)
          Constructs a BuddhistDateTime from a ReadableInstant.
BuddhistDateTime(java.lang.String str)
          Constructs a BuddhistDateTime from an ISO formatted String.
BuddhistDateTime(java.lang.String str, DateTimeZone zone)
          Constructs a BuddhistDateTime from an ISO formatted String.
 
Methods inherited from class org.joda.time.DateTime
dayOfMonth, dayOfWeek, dayOfYear, era, getChronology, getDayOfMonth, getDayOfWeek, getDayOfYear, getEra, getHourOfDay, getLeapYear, getMillis, getMillisOfDay, getMillisOfSecond, getMinuteOfDay, getMinuteOfHour, getMonthOfYear, getSecondOfDay, getSecondOfMinute, getWeekOfYearWeek, getWeekOfYearYear, getYear, getYearOfEra, hourOfDay, leapYear, millisOfDay, millisOfSecond, minuteOfDay, minuteOfHour, monthOfYear, secondOfDay, secondOfMinute, toString, weekOfYearWeek, weekOfYearYear, year, yearOfEra
 
Methods inherited from class org.joda.time.AbstractInstant
compareTo, equals, get, hashCode, isAfter, isBefore, isEqual, toCalendar, toDate, toGregorianCalendar, toInstant
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuddhistDateTime

public BuddhistDateTime()
Constructs a BuddhistDateTime to the current datetime, as reported by the system clock. The time zone is set to DateTimeZone.getDefault().


BuddhistDateTime

public BuddhistDateTime(DateTimeZone zone)
Constructs a BuddhistDateTime to the current datetime, as reported by the system clock. If the supplied time zone is null, it is set to DateTimeZone.getDefault().

Parameters:
zone - the time zone, null is default

BuddhistDateTime

public BuddhistDateTime(long millis)
Constructs a BuddhistDateTime set to the milliseconds from 1970-01-01T00:00:00Z. The time zone is set to DateTimeZone.getDefault().

Parameters:
millis - the milliseconds

BuddhistDateTime

public BuddhistDateTime(long millis,
                        DateTimeZone zone)
Constructs a BuddhistDateTime set to the milliseconds from 1970-01-01T00:00:00Z. If the supplied time zone is null, it is set to DateTimeZone.getDefault().

Parameters:
millis - the milliseconds
zone - the time zone, null is default

BuddhistDateTime

public BuddhistDateTime(ReadableInstant instant)
Constructs a BuddhistDateTime from a ReadableInstant. The time zone is set to DateTimeZone.getDefault().

Parameters:
instant - the ReadableInstant.
Throws:
java.lang.IllegalArgumentException - if the instant is null.

BuddhistDateTime

public BuddhistDateTime(ReadableInstant instant,
                        DateTimeZone zone)
Constructs a BuddhistDateTime from a ReadableInstant. If the supplied time zone is null, it is set to DateTimeZone.getDefault().

Parameters:
instant - the ReadableInstant.
zone - the time zone, null is default
Throws:
java.lang.IllegalArgumentException - if the instant is null.

BuddhistDateTime

public BuddhistDateTime(java.util.Date date)
Constructs a BuddhistDateTime from a Date. The time zone is set to DateTimeZone.getDefault().

Parameters:
date - the Date
Throws:
java.lang.IllegalArgumentException - if the date is null.

BuddhistDateTime

public BuddhistDateTime(java.util.Date date,
                        DateTimeZone zone)
Constructs a BuddhistDateTime from a Date. If the supplied time zone is null, it is set to DateTimeZone.getDefault().

Parameters:
date - the Date
zone - the time zone, null is default
Throws:
java.lang.IllegalArgumentException - if date is null.

BuddhistDateTime

public BuddhistDateTime(java.util.Calendar calendar)
Constructs a BuddhistDateTime from a Calendar. The time zone is set to DateTimeZone.getDefault().

Parameters:
calendar - the Calendar
Throws:
java.lang.IllegalArgumentException - if the calendar is null.

BuddhistDateTime

public BuddhistDateTime(java.util.Calendar calendar,
                        DateTimeZone zone)
Constructs a BuddhistDateTime from a Calendar. If the supplied time zone is null, it is set to DateTimeZone.getDefault().

Parameters:
calendar - the Calendar
zone - the time zone, null is default
Throws:
java.lang.IllegalArgumentException - if the calendar is null.

BuddhistDateTime

public BuddhistDateTime(java.lang.String str)
                 throws java.text.ParseException
Constructs a BuddhistDateTime from an ISO formatted String. The time zone is set to DateTimeZone.getDefault().

Parameters:
str - the string to parse.
Throws:
java.lang.IllegalArgumentException - if the string is null.
java.text.ParseException - if parsing fails.

BuddhistDateTime

public BuddhistDateTime(java.lang.String str,
                        DateTimeZone zone)
                 throws java.text.ParseException
Constructs a BuddhistDateTime from an ISO formatted String. If the supplied time zone is null, it is set to DateTimeZone.getDefault().

Parameters:
str - the string to parse.
zone - the time zone, null is default
Throws:
java.lang.IllegalArgumentException - if the string is null.
java.text.ParseException - if parsing fails.

Joda Time API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.