The AudioDate class

An AudioDate object represents a date to be "spoken" to the user. The AudioDate class has a calendar property, in the form of a java.util.Calendar object, which represents the date, and a timeZone property which represents the time zone of the AudioDate object.

The style property inherited from the superclass MediaType has several different values for an AudioDate object. Together with the locale property, also inherited from MediaType, they affect the way the date is "spoken":
  • MDY: Month, day-of-month and year, played in an order appropriate for the locale. This is the default.
  • Full: The day-of-week, month, day-of-month and year, played in an order appropriate for the locale.
  • DOW: The day of the week.
  • DMD: Day-of-week, month and day-of-month, played in an order appropriate for the locale.
  • MD: Month and day-of-month, played in an order appropriate for the locale.
  • MY: Month and year, played in an order appropriate for the locale.
The constructor methods for this class are:
AudioDate()
Constructs a "current-time" audio date object with a style of MDY. The time zone is taken from the default time zone of the Java virtual machine (JVM). You can set the properties of the AudioDate object later using the methods setValue() and setTimeZone().
AudioDate(java.util.Calendar calendar)
Constructs an audio date object with a specified value and a style of MDY. The time zone of the AudioDate object is set to the time zone of the Calendar object.
AudioDate(java.util.Calendar calendar, java.lang.String style)
Constructs an audio date object with a specified value and style.
AudioDate(java.util.TimeZone tz)
Constructs a "current-time" audio date object with adjustment for a specified time zone. For example, if the time at which the AudioDate is spoken is 2300 hours universal time (UT) on February 17th, and the time zone specified is UT+2, then the date value spoken will be February 18th.
For example:
public class InApp extends WVRApplication {
  // Create an audio date
  public AudioDate today = new AudioDate(Calendar.getInstance(), "MD");
  .
  .
  .
}