fromDate()

Gets a Calendar set to the time of the given Date using the default time zone and locale.

Syntax

Calendar fromDate(Date date [, String timeZone [, String locale] ])
  1. date is the date used to get the Calendar.
  2. timeZone (optional) is the time zone used to get the Calendar. If timeZone is not specified, the Calendar is based on the specified time in the default time zone.
  3. locale (optional) is the locale used to get the Calendar. If locale is not specified, the Calendar is based on the default locale.