name | description |
---|---|
<String?> locale | Locales are specified either with a specifier string that follows the BCP-47 convention, (roughly: "language-script-region"). |
<int?> year | The year |
<int?> month | The month |
<int?> day | The day of the month |
<int?> hour | The hour of the day |
<int?> minute | The minute [0..59] |
<int?> second | The second [0..59] |
<int?> millisecond | The millisecond [0..999] |
<int?> unixtime | Sets the time of this instance according to the given unix time. Unix time is the number of milliseconds since midnight on Jan 1, 1970. |
<String?> timezone | Time zone name as a string |
<String?> type | Specifies the type/calendar of the date desired. The list of valid values changes depending on which calendars are defined. i.e. "gregorian", "ethiopic", "thaisolar", "persian" etc. This property may also be given as "calendar" instead of "type". |
<String?> calendar | Same as "type" property |
<DateTime?> dateTime | DateTime class of flutter |
ILibDateOptions (String? locale, int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? unixtime, String? type, String? calendar, DateTime? dateTime)
name | description |
---|---|
String toJsonString() | A string representation of parameters to call functions of iLib library properly |
name | description |
---|---|
<String?> locale | Locale to use when formatting the date/time |
<String?> type | Specifies whether this formatter should format times only, dates only, or both times and dates together. Valid values are "time", "date", and "datetime". Note that in some locales, the standard format uses the order "time followed by date" and in others, the order is exactly opposite, so it is better to create a single "datetime" formatter than it is to create a time formatter and a date formatter separately and concatenate the results. A "datetime" formatter will get the order correct for the locale. The default type if none is specified in with the type option is "date". |
<String?> length | Specifies the length of the format to use. The length is the approximate size of the formatted string. - "short": use a short representation of the time. This is the most compact format possible for the locale." - "medium": use a medium length representation of the time. This is a slightly longer format. - "long": use a long representation of the time. This is a fully specified format, but some of the textual components may still be abbreviated - "full": use a full representation of the time. This is a fully specified format where all the textual components are spelled out completely Note that the length parameter does not specify which components are to be formatted. Use the "date" and the "time" properties to specify the components. Also, very few of the components of a time format differ according to the length, so this property has little to no effect on time formatting. |
<String?> timezone | Time zone to use when formatting times. This may be a time zone instance or a time zone specifier from the IANA list of time zone database names (eg. "America/Los_Angeles"), the string "local", or a string specifying the offset in RFC 822 format. |
<String?> calendar | The type of calendar to use for this format. The value should be a string containing the name of the calendar. the supported types are "gregorian", "julian", "persian", "ethiopic", "thaisolar", "arabic", "hebrew", or "chinese". If the calendar is not specified, then the default calendar for the locale is used. |
<String?> date | This property tells which components of a date format to use. For example, sometimes you may wish to format a date that only contains the month and date without the year, such as when displaying a person's yearly birthday. The value of this property allows you to specify only those components you want to see in the final output, ordered correctly for the locale. Valid values are: "dmwy", "dmy", "dmw", "dm", "my", "dw", "d", "m","n","y" Default components, if this property is not specified, is "dmy". |
<String?> time | This property gives which components of a time format to use. The time will be formatted correctly for the locale with only the time components requested. For example, a clock might only display the hour and minute and not need the seconds or the am/pm component. In this case, the time property should be set to "hm". Valid values for this property are: "ahmsz", "ahms", "hmsz", "hms", "ahmz", "ahm", hmz", ah", "hm", "ms", "h", "m", "s" Default value if this property is not specified is "hma". |
<bool?> useNative | The flag used to determine whether to use the native script settings for formatting the numbers. |
<String?> meridiems | String that specifies what style of meridiems to use with this format. The choices are "default", "gregorian", "ethiopic", and "chinese". |
ILibDateFmtOptions (String? locale, String? length, String? type, String? calendar, String? timezone, String? date, String? time, bool? useNative, String? meridiems)
name | description |
---|---|
<ILibDateFmtOptions> options | Options for the DateFormating |
ILibDateFmt(ILibDateFmtOptions options)
name | description |
---|---|
String toJsonString() | A string representation of parameters to call functions of iLib library properly |
String format() | Formats a particular date instance according to the settings of this formatter object |
int getClock() | Returns the default clock from the locale is returned instead."12" or "24" depending on whether this formatter uses the 12-hour or 24-hour clock |
String getTemplate() | Return the template string that is used to format date/times for this formatter instance |
List<MeridiemsInfo> getMeridiemsRange() | Return the range of possible meridiems (times of day like "AM" or "PM") in this date formatter. |
name | description |
---|---|
<String> locale | The locale for which the info is sought |
ILibLocaleInfo(String locale)
name | description |
---|---|
int getFirstDayOfWeek() | Returns the day of week that starts weeks in the current locale. Days are still numbered the standard way with 0 for Sunday through 6 for Saturday, but calendars should be displayed and weeks calculated with the day of week returned from this function as the first day of the week. |
int getWeekEndStart() | Returns the day of week that starts weekend in the current locale. Days are still numbered the standard way with 0 for Sunday through 6 for Saturday. |
int getWeekEndEnd() | Returns the day of week that ends weekend in the current locale. Days are still numbered the standard way with 0 for Sunday through 6 for Saturday. |