Skip to content

Releases: rbatis/fastdate

v0.3.22

15 Nov 15:43
Compare
Choose a tag to compare

v0.3.22

  • Time struct rename minute to get_minute

v0.3.21

15 Nov 09:14
Compare
Choose a tag to compare

v0.3.21

  • update parse method impl

v0.3.19

15 Nov 03:45
Compare
Choose a tag to compare

v0.3.19

  • add format(fmt:&str) method
    format support token = ["YYYY","MM","DD","hh","mm","ss",".000000","+00:00"]
 let dt = fastdate::DateTime::from((
         fastdate::Date {
             day: 1,
             mon: 1,
            year: 2000,
         },
        fastdate::Time {
             nano: 123456000,
             sec: 11,
            minute: 1,
             hour: 1,
         })).set_offset(8 * 60 * 60);
   println!("{}",dt.format("YYYY/MM/DD/hh/mm/ss/.000000/+00:00"));
   println!("{}",dt.format("YYYY-MM-DD/hh/mm/ss"));
  • add pub fn offset_hms(&self) -> (i8, i8, i8);

v0.3.17

08 Nov 15:03
Compare
Choose a tag to compare

v0.3.17

  • parse an string by format.
  • format support token = ["YYYY","MM","DD","hh","mm","ss",".000000","+00:00"]
  • format str must be example:

or time zone(UTC+Hour)

 fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000+00:00", "2022-12-13 11:12:14.123456+06:00").unwrap();
 fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000+00:00", "2022-12-13 11:12:14.123456-03:00").unwrap();

or time zone(UTC)

 fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000Z", "2022-12-13 11:12:14.123456Z").unwrap();

parse local time

 fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000","2022-12-13 11:12:14.123456").unwrap();

or any position

 fastdate::DateTime::parse("YYYY-MM-DD,hh:mm:ss.000000","2022-12-13,11:12:14.123456").unwrap();

or time zone(UTC)

 fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000", "2022-12-13 11:12:14.123456Z").unwrap();

or time zone(UTC+Hour)

 fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000", "2022-12-13 11:12:14.123456+06:00").unwrap();

v0.3.16

08 Nov 09:33
Compare
Choose a tag to compare

v0.3.16

  • parse Performance improvement

v0.3.15

08 Nov 09:04
Compare
Choose a tag to compare

v0.3.15

  • fix from_str maybe panic on string is empty

v0.3.14

04 Nov 14:47
Compare
Choose a tag to compare

v0.3.14

  • support parse zone

/// parse local time

fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000","2022-12-13 11:12:14.123456").unwrap();

///or any position

fastdate::DateTime::parse("YYYY-MM-DD,hh:mm:ss.000000","2022-12-13,11:12:14.123456").unwrap();

/// or time zone(UTC)

fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000", "2022-12-13 11:12:14.123456Z").unwrap();

/// or time zone(UTC+Hour)

fastdate::DateTime::parse("YYYY-MM-DD hh:mm:ss.000000", "2022-12-13 11:12:14.123456+06:00").unwrap();

v0.3.12

28 Oct 11:53
Compare
Choose a tag to compare

v0.3.12

  • fix some bugs

v0.3.11

23 Oct 06:17
Compare
Choose a tag to compare

v0.3.11

  • add from(Date,Time,offset sec)

v0.3.10

22 Oct 08:47
Compare
Choose a tag to compare

v0.3.10

  • fix parse method for zone