Stating your time as HH
will give you 24h format, and hh
will give 12h format.
You can also find it here in the documentation :
H, HH 24 hour time
h, or hh 12 hour time (use in conjunction with a or A)
More Related Contents:
- Get hours difference between two dates in Moment Js
- Moment js date time comparison
- Format date with Moment.js
- Deprecation warning in Moment.js – Not in a recognized ISO format
- Vuejs and Vue.set(), update array
- Parse string to date with moment.js
- How to exclude weekends between two dates using Moment.js
- How do I change the language of moment.js?
- Comparing two times with Moment JS
- Moment JS start and end of given month
- Find next instance of a given weekday (ie. Monday) with moment.js
- Moment Js UTC to Local Time
- How can I remove time from date with Moment.js?
- Add a duration to a moment (moment.js)
- How Do I calculate the difference of 2 time zones in JavaScript?
- How to enumerate dates between two dates in Moment
- from unix timestamp to datetime
- Moment.js – two dates difference in number of days
- How do I set a mock date in Jest?
- Get timezone abbreviation using offset value
- How to properly add 1 month to current date in moment.js
- Round a timestamp to the nearest date
- How to get difference between 2 Dates in Years, Months and days using moment.js
- How do I format a date as ISO 8601 in moment.js?
- Starting the week on Monday with isoWeekday()
- Convert date to UTC using moment.js
- Moment.js months difference
- Get the days, hours and minutes in Moment.js
- How to convert Moment.js date to users local timezone?
- moment.js isValid function not working properly