Hoogle Search
Within LTS Haskell 24.40 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
LongFormatStyle :: FormatStyletext-icu Data.Text.ICU.DateFormatter Long style, such as January 12, 1952 or 3:30:32pm
MediumFormatStyle :: FormatStyletext-icu Data.Text.ICU.DateFormatter Medium style, such as Jan. 12, 1952
-
text-icu Data.Text.ICU.DateFormatter No style.
RelativeFormatStyle :: FormatStyletext-icu Data.Text.ICU.DateFormatter Relative style: ICU currently provides limited support for formatting dates using a “relative” style, specified using RELATIVE_SHORT, RELATIVE_MEDIUM, RELATIVE_LONG or RELATIVE_FULL. As currently implemented, relative date formatting only affects the formatting of dates within a limited range of calendar days before or after the current date, based on the CLDR type="day"/relative data: For example, in English, “Yesterday”, “Today”, and “Tomorrow”. Within this range, the specific relative style currently makes no difference. Outside of this range, relative dates are formatted using the corresponding non-relative style (SHORT, MEDIUM, etc.). Relative time styles are not currently supported, and behave just like the corresponding non-relative style.
ShortFormatStyle :: FormatStyletext-icu Data.Text.ICU.DateFormatter Short style, such as 121352 or 3:30pm
patternDateFormatter :: Text -> LocaleName -> Text -> IO DateFormattertext-icu Data.Text.ICU.DateFormatter Create a new DateFormatter using a custom pattern as described at https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax. For examples the pattern "yyyy.MM.dd G at HH:mm:ss zzz" produces “1996.07.10 AD at 15:08:56 PDT” in English for the PDT time zone. A date pattern is a string of characters, where specific strings of characters are replaced with date and time data from a calendar when formatting or used to generate data for a calendar when parsing. The Date Field Symbol Table contains the characters used in patterns to show the appropriate formats for a given locale, such as yyyy for the year. Characters may be used multiple times. For example, if y is used for the year, "yy" might produce “99”, whereas "yyyy" produces “1999”. For most numerical fields, the number of characters specifies the field width. For example, if h is the hour, "h" might produce “5”, but "hh" produces “05”. For some characters, the count specifies whether an abbreviated or full form should be used, but may have other choices, as given below. Two single quotes represents a literal single quote, either inside or outside single quotes. Text within single quotes is not interpreted in any way (except for two adjacent single quotes). Otherwise all ASCII letter from a to z and A to Z are reserved as syntax characters, and require quoting if they are to represent literal characters. In addition, certain ASCII punctuation characters may become variable in the future (eg : being interpreted as the time separator and / as a date separator, and replaced by respective locale-sensitive characters in display). “Stand-alone” values refer to those designed to stand on their own independently, as opposed to being with other formatted values. “2nd quarter” would use the wide stand-alone format "qqqq", whereas “2nd quarter 2007” would use the regular format "QQQQ yyyy". For more information about format and stand-alone forms, see CLDR Calendar Elements. The pattern characters used in the Date Field Symbol Table are defined by CLDR; for more information see CLDR Date Field Symbol Table. 👉 Note that the examples may not reflect current CLDR data.
standardDateFormatter :: FormatStyle -> FormatStyle -> LocaleName -> Text -> IO DateFormattertext-icu Data.Text.ICU.DateFormatter Create a new DateFormatter from the standard styles.
>>> import Data.Text >>> dfDe <- standardDateFormatter LongFormatStyle LongFormatStyle (Locale "de_DE") (pack "CET")
u_BRK_MALFORMED_RULE_TAG :: ICUErrortext-icu Data.Text.ICU.Error No documentation available.
u_INVALID_FORMAT_ERROR :: ICUErrortext-icu Data.Text.ICU.Error No documentation available.
u_INVALID_TABLE_FORMAT :: ICUErrortext-icu Data.Text.ICU.Error No documentation available.