isBefore() in moment js returning false instead of true

User 101

The following line is returning false instead of true

console.log(moment('9:30 AM', 'h:mm A').isBefore(moment('12:30 AM', 'h:mm A')));

what am I missing here. please explain.

Wasif Khan

9 AM is not isBefore 12:30 AM, I think you mean here 12:30 PM.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

why is this code returning true instead of false

Returning falsy values in javascript instead of true/false

Why is this definition returning False instead of True?

Why is it returning None instead of True or False?

Should be returning true but returns false instead?

Moment.js isBefore function not working as expected

TextView returning both true and false statements instead of only true

moment isBetween returning false

JS, function returns undefined instead of true or false

Is there a downside to returning 1 or 0 instead of true or false in JavaScript?

IF function returning TRUE/FALSE instead of referenced cell values

.str.contains returning actual found value instead of True or False

Python: Finding a substring in a string, but returning True or False instead of the index position

Moment.js .isBefore comparing dates with a time zone offset

moment().isBefore is not working properly?

Query returning true/false

It return false instead of true

redis.js get is returning true instead of the value

State set to true is returning false

else if returning true when false

Returning true false from Promise

Returning true or false in a SQL function

Method Returning False but expected true

checkbox returning true or false in rails

Pygame colliderect() function returning 0 (zeros) and 1 (ones) instead of True and False?

Python: returning None instead of False

Returning True if a value is present in an enum; returning false if not

Moment.js isBefore() not working when checking for if before 12pm/Noon

isValid() function from moment.js library returns false for something that should be true