ZonedDateTime class

Created by Luis on 03/08/19. This wrapper class is necessary because java.time.ZonedDateTime has issues with Gson serialization, which requires a custom TypeAdapter to serialize/deserialize it... But more important is that ZoneDateTime parsing from String requires Android min API level 26 when this project has defined min API level 21.

Default date format example: 2001-07-04T12:08:56.867-07:00 Default formatted date format example: Wed, 4 Jul 2001 12:08:56 PM

Inheritance

Constructors

ZonedDateTime({String date, int dateTimeMillis, DateTime dateAsDateTime, bool use24h, String dateFormatStandard, String formattedDateTimeFormat, String formattedDateFormat, String formattedTimeFormat, List<String> dateFormatList, List<String> formattedDateFormatList, List<String> formattedTimeFormatList})
ZonedDateTime.fromJson(String json)
factory
ZonedDateTime.fromJsonMap(Map<String, dynamic> json)
factory

Properties

dateFormatList List<String>
@JsonKey(ignore: true), read / write
formattedDateFormatList List<String>
@JsonKey(ignore: true), read / write
formattedTimeFormatList List<String>
@JsonKey(ignore: true), read / write
hasZoneOffset bool
read-only
localZoneOffsetAsString String
read-only
date String
read / write, inherited
dateAsDateTime DateTime
@JsonKey(ignore: true), read / write, inherited
dateAsDateTimeLocal DateTime
@JsonKey(ignore: true), read / write, inherited
dateFormat String
@JsonKey(ignore: true), read / write, inherited
dateTimeMillis int
@JsonKey(ignore: true), read / write, inherited
formattedDateFormat String
@JsonKey(ignore: true), read / write, inherited
formattedDateTimeFormat String
@JsonKey(ignore: true), read / write, inherited
formattedTimeFormat String
@JsonKey(ignore: true), read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
use24h bool
@JsonKey(ignore: true), read / write, inherited

Methods

getDate() String
override
getDateAsDateTime() DateTime
override
getDateFormatList() List<String>
getFormattedDateFormatList() List<String>
getFormattedTimeFormatList() List<String>
setDateFormatList(List<String> value) → dynamic
setFormattedDateFormatList(List<String> value) → dynamic
setFormattedTimeFormatList(List<String> value) → dynamic
format({String format}) String
inherited
formatted() String
inherited
formattedDate() String
inherited
formattedDateShort() String
inherited
formattedShort() String
inherited
formattedTime() String
inherited
formattedTimeShort() String
inherited
getDateAsDateTimeLocal() DateTime
inherited
getDateFormat() String
inherited
getDateTimeMillis() int
inherited
getFormattedDateFormat() String
inherited
getFormattedDateTimeFormat() String
inherited
getFormattedTimeFormat() String
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
setDate(String value) → dynamic
inherited
setDateAsDateTime(DateTime value) → dynamic
inherited
setDateAsDateTimeLocal(DateTime value) → dynamic
inherited
setDateFormat(String value) → dynamic
inherited
setDateTimeMillis(int value) → dynamic
inherited
setFormattedDateFormat(String value) → dynamic
inherited
setFormattedDateTimeFormat(String value) → dynamic
inherited
setFormattedTimeFormat(String value) → dynamic
inherited
toJson() String
inherited
toJsonMap() Map<String, dynamic>
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator <(dynamic other) bool
inherited
operator <=(dynamic other) bool
inherited
operator ==(dynamic other) bool
The equality operator. [...]
inherited
operator >(dynamic other) bool
inherited
operator >=(dynamic other) bool
inherited

Constants

FORMATTED_DATE_FORMAT_LIST → const List<String>
const ['D', ', ', 'd', ' ', 'M', ' ', 'yyyy', ' ', 'hh', ':', 'nn', ':', 'ss', ' ', &quo…
FORMATTED_TIME_FORMAT_LIST → const List<String>
const ['hh', ':', 'nn', ':', 'ss', ' ', "am"]
FULL_ZONED_DATE_TIME_FORMAT → const String
"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
SIMPLE_ZONED_DATE_TIME_FORMAT → const String
"yyyy-MM-dd'T'HH:mm:ssXXX"
THREE_LETTER_ISO_8601_TIME_ZONE_FORMAT → const List<String>
const ['yyyy', '-', 'mm', '-', 'dd', 'T', 'HH', ':', 'nn', ':', 'ss', '.', 'SSS']
TWO_LETTER_ISO_8601_TIME_ZONE_FORMAT → const List<String>
here the ZoneOffset is managed manually to add the colon(:) between two digit hours and two digit minutes
const ['yyyy', '-', 'mm', '-', 'dd', 'T', 'HH', ':', 'nn', ':', 'ss', '.', 'SSS', 'z']