format.bend checks
raw source on the hub · import bend-datetime@0.4.0.1/format.bend as Format
5 imports
import Base import 0xe49a3e6521e1b71e55654a885f27bcc1/parse.bend as P import ./date.bend as D import ./datetime.bend as DT import ./instant.bend as I
Types
type Format.Error source · line 7 · raw
Data
Unexpected@offset:Nat -> @char:Char -> Format.Error
Eof@offset:Nat -> Format.Error
Overflow@offset:Nat -> Format.Error
Extra@offset:Nat -> @char:Char -> Format.Error
InvalidDate@year:U32 -> @month:U32 -> @day:U32 -> Format.Error
InvalidTime@hour:U32 -> @minute:U32 -> @second:U32 -> Format.Error
InvalidOffset@hour:U32 -> @minute:U32 -> Format.Error
NegativeZeroOffsetFormat.Error
BadFraction@offset:Nat -> Format.Error
type Format.FracP source · line 18 · raw
Data
FracP@frac:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.TimeFrac -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> Format.FracP
type Format.OffP source · line 21 · raw
Data
OffP@offset:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.UtcOffset -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> Format.OffP
type Format.DateP source · line 24 · raw
Data
DateP@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> Format.DateP
Definitions
def Format.from_parse source · line 27 · raw
@e:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error -> Format.Error
def Format.digit source · line 38 · raw
@n:U32 -> Char
def Format.pad2 source · line 41 · raw
@+n:U32 -> String
def Format.pad4 source · line 47 · raw
@+n:U32 -> String
def Format.pad_n.go source · line 59 · raw
@k:Nat -> @+n:U32 -> @acc:String -> String
def Format.pad_n source · line 68 · raw
@n:U32 -> @k:Nat -> String
def Format.show_date source · line 71 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> String
def Format.show_frac source · line 81 · raw
@frac:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.TimeFrac -> String
def Format.show_off source · line 88 · raw
@offset:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.UtcOffset -> String
def Format.show_time source · line 101 · raw
@time:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.TimeOfDay -> String
def Format.show.join source · line 117 · raw
@ds:String -> @ts:String -> @os:String -> String
def Format.show source · line 120 · raw
@odt:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime -> String
def Format.cur_off source · line 127 · raw
@cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> Nat
def Format.nacc source · line 132 · raw
@+acc:U32 -> @+h:Char -> U32
def Format.frac.end_ok2 source · line 135 · raw
@s:String -> @acc:U32 -> @off:Nat -> @got:Nat -> @z:Bool -> Result<&2, &2, Format.Error, Format.FracP>
def Format.frac.end_ok source · line 144 · raw
@s:String -> @acc:U32 -> @off:Nat -> @+got:Nat -> Result<&2, &2, Format.Error, Format.FracP>
def Format.frac.go source · line 149 · raw
@s:String -> @n:Nat -> @dig:Bool -> @+h:Char -> @+acc:U32 -> @off:Nat -> @got:Nat -> Result<&2, &2, Format.Error, Format.FracP>
def Format.frac.start source · line 166 · raw
@s:String -> @off:Nat -> Result<&2, &2, Format.Error, Format.FracP>
def Format.frac.digits2 source · line 175 · raw
@r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, Format.FracP>
def Format.frac.dot source · line 184 · raw
@cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @is_dot:Bool -> Result<&2, &2, Format.Error, Format.FracP>
def Format.frac.after2 source · line 193 · raw
@cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @m:Maybe<&2, Char> -> Result<&2, &2, Format.Error, Format.FracP>
def Format.frac.after source · line 202 · raw
@+cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> Result<&2, &2, Format.Error, Format.FracP>
def Format.off.mk source · line 207 · raw
@west:Bool -> @h:U32 -> @mi:U32 -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @r:Result<&2, &2, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.UtcOffset.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.UtcOffset> -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.min2 source · line 219 · raw
@+west:Bool -> @+h:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Dec> -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.colon source · line 228 · raw
@west:Bool -> @h:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.hour2 source · line 237 · raw
@west:Bool -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Dec> -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.sign2 source · line 246 · raw
@west:Bool -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.z2 source · line 255 · raw
@r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.minus source · line 264 · raw
@minus:Bool -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @+c:Char -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.pm source · line 273 · raw
@plus:Bool -> @minus:Bool -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @+c:Char -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.ch2 source · line 282 · raw
@z:Bool -> @plus:Bool -> @minus:Bool -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @+c:Char -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.ch source · line 291 · raw
@cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @+c:Char -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.after2 source · line 298 · raw
@cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @m:Maybe<&2, Char> -> Result<&2, &2, Format.Error, Format.OffP>
def Format.off.after source · line 307 · raw
@+cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> Result<&2, &2, Format.Error, Format.OffP>
def Format.civil.mk source · line 312 · raw
@+y:U32 -> @+m:U32 -> @+d:U32 -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @r:Result<&2, &2, 0x5d092e40b48ee431bc4b160e8797f9d5/date.Date.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/date.Date> -> Result<&2, &2, Format.Error, Format.DateP>
def Format.civil.d2 source · line 324 · raw
@+y:U32 -> @+m:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Dec> -> Result<&2, &2, Format.Error, Format.DateP>
def Format.civil.dash2 source · line 333 · raw
@y:U32 -> @m:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, Format.DateP>
def Format.civil.m2 source · line 342 · raw
@y:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Dec> -> Result<&2, &2, Format.Error, Format.DateP>
def Format.civil.dash1 source · line 351 · raw
@y:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, Format.DateP>
def Format.civil.y source · line 360 · raw
@r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Dec> -> Result<&2, &2, Format.Error, Format.DateP>
def Format.civil source · line 369 · raw
@text:String -> Result<&2, &2, Format.Error, Format.DateP>
def Format.read_date.fin2 source · line 372 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, Unit> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/date.Date>
def Format.read_date.fin source · line 381 · raw
@r:Result<&2, &2, Format.Error, Format.DateP> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/date.Date>
def Format.read_date source · line 390 · raw
@text:String -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/date.Date>
def Format.read.fin2 source · line 393 · raw
@odt:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, Unit> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.off2 source · line 402 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @time:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.TimeOfDay -> @r:Result<&2, &2, Format.Error, Format.OffP> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.time2 source · line 412 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @+h:U32 -> @+mi:U32 -> @+s:U32 -> @frac:0x5d092e40b48ee431bc4b160e8797f9d5/datetime.TimeFrac -> @cur:0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur -> @r:Result<&2, &2, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.TimeOfDay.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.TimeOfDay> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.frac2 source · line 422 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @+h:U32 -> @+mi:U32 -> @+s:U32 -> @r:Result<&2, &2, Format.Error, Format.FracP> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.sec2 source · line 434 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @h:U32 -> @mi:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Dec> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.colon2 source · line 444 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @h:U32 -> @mi:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.min2 source · line 454 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @h:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Dec> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.colon1 source · line 463 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @h:U32 -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.hour2 source · line 472 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Dec> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.t2 source · line 481 · raw
@date:0x5d092e40b48ee431bc4b160e8797f9d5/date.Date -> @r:Result<&2, &2, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Error, 0xe49a3e6521e1b71e55654a885f27bcc1/parse.Parse.Cur> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read.after_date source · line 490 · raw
@r:Result<&2, &2, Format.Error, Format.DateP> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.read source · line 499 · raw
@text:String -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime>
def Format.show_read source · line 504 · raw
@r:Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime> -> Result<&2, &2, Format.Error, String>
def Format.show_instant.map source · line 513 · raw
@r:Result<&2, &2, 0x5d092e40b48ee431bc4b160e8797f9d5/date.Date.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime> -> Result<&2, &2, 0x5d092e40b48ee431bc4b160e8797f9d5/date.Date.Error, String>
def Format.show_instant source · line 522 · raw
@i:0x5d092e40b48ee431bc4b160e8797f9d5/instant.Instant -> Result<&2, &2, 0x5d092e40b48ee431bc4b160e8797f9d5/date.Date.Error, String>
def Format.read_instant.map source · line 527 · raw
@r:Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/datetime.OffsetDateTime> -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/instant.Instant>
def Format.read_instant source · line 536 · raw
@text:String -> Result<&2, &2, Format.Error, 0x5d092e40b48ee431bc4b160e8797f9d5/instant.Instant>