Browse files

Add constructor to take Calendar value

As the java.util.Date class is more or less deprecated, and in the examples of ical4j the Calendar is just to deal with this.
It makes sense to add a constructor which takes a Calendar value.
  • Loading branch information...
artheus committed Apr 12, 2016
1 parent 0cf56c5 commit f387f17c1f3ba29af814fabc47e3ab812443e5e0
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/main/java/net/fortuna/ical4j/model/
@@ -149,6 +149,13 @@ public Date(final long time) {
protected Date(final long time, final int precision, TimeZone tz) {
super(time, DEFAULT_PATTERN, precision, tz);
* @param calendar a calendar value
public Date(final java.util.Calendar calendar) {
this(calendar.getTimeInMillis(), Dates.PRECISION_DAY, TimeZones.getDateTimeZone());
* @param date a date value

0 comments on commit f387f17

Please sign in to comment.