Documentation

Std.Time.Format.Basic

This module defines the Formatter types. It is based on the Java's DateTimeFormatter format.

The part of a formatting string. A string is just a text and a modifier is in the format described in the Modifier type.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[reducible, inline]

      The format of date and time string.

      Equations
      Instances For

        If the format is aware of some timezone data it parses or if it parses any timezone.

        Instances For

          Configuration options for formatting and parsing date/time strings.

          • allowLeapSeconds : Bool

            Whether to allow leap seconds, such as 2016-12-31T23:59:60Z. Default is false.

          • dateformat : DateFormat

            Locale configuration for formatting and parsing, including locale-specific symbols and the first day of the week used for week-of-year and week-of-month calculations. Default is DateFormat.enUS (English, US).

          Instances For
            structure Std.Time.GenericFormat (awareness : Awareness) :

            A specification on how to format a data or parse some string.

            • config : FormatConfig

              Configuration options for formatting behavior.

            • string : FormatString

              The format string used for parsing and formatting.

            Instances For

              Classify a PlainTime into a DayPeriod for the b pattern.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Classify a PlainTime into an ExtendedDayPeriod for the B pattern (CLDR flexible periods).

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Equations
                  Instances For

                    Parses a short month name using the given locale symbols and returns the corresponding Month.Ordinal.

                    Equations
                    Instances For

                      Constructs a new GenericFormat specification for a date-time string. Modifiers can be combined to create custom formats, such as "YYYY, MMMM, D".

                      Equations
                      Instances For

                        Builds a GenericFormat from the input string. If parsing fails, it will panic

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Formats a DateTime value into a string using the given GenericFormat.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Parser for a format with a builder.

                            Equations
                            Instances For

                              Parses the input string into a DateTime.

                              Equations
                              Instances For

                                Parses the input string into a DateTime and panics if its wrong.

                                Equations
                                Instances For
                                  def Std.Time.GenericFormat.parseBuilder {aw : Awareness} {α : Type} (format : GenericFormat aw) (builder : FormatType (Option α) format.string) (input : String) :

                                  Parses an input string using a builder function to produce a value.

                                  Equations
                                  Instances For
                                    def Std.Time.GenericFormat.parseBuilder! {α : Type} {aw : Awareness} [Inhabited α] (format : GenericFormat aw) (builder : FormatType (Option α) format.string) (input : String) :
                                    α

                                    Parses an input string using a builder function, panicking on errors.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      def Std.Time.GenericFormat.formatGeneric {aw : Awareness} (format : GenericFormat aw) (getInfo : (typ : Modifier) → Option (TypeFormat typ)) :

                                      Formats the date using the format into a String, using a getInfo function to get the information needed to build the String.

                                      Equations
                                      Instances For

                                        Constructs a FormatType function to format a date into a string using a GenericFormat.

                                        Equations
                                        Instances For
                                          class Std.Time.Format (f : Type) (typ : TypefType) :

                                          Typeclass for formatting and parsing values with the given format type.

                                          • format (fmt : f) : typ String fmt

                                            Converts a format f into a string.

                                          • parse {α : Type} (fmt : f) : typ (Option α) fmtStringExcept String α

                                            Parses a string into a format using the provided format type f.

                                          Instances