Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Parsing date from formathh gives valid true even if the hour is greater than 12 #1655

Open
@rohitkhatri

Description

@rohitkhatri

Describe the bug
Parsing time from string based on ahh:mm a format gives valid true even if the hour is greater than 12

To Reproduce

import{DateTime}from"luxon";constdate=DateTime.fromFormat('13:00 AM','hh:mm a',{});console.log(date);console.log(date.isValid);

Actual vs Expected behavior
It should give invalid since the definition ofhh is 12 hours clock

Desktop (please complete the following information):

  • OS: MacOS M1
  • Browser Chrome: 123
  • Luxon version: 3.1.0
  • Your timezone: Asia/Kolkata

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp