Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: gmullinI came across this where isDate will return true for a date value of 2015-04-01z, when I do mydate.isDate("CCYY-MM-DD"). To me that should fail because of the z at the end. I've attached a couple of nodes I created to show this issue. If I change my check to also take into account the length of mydate, then I get the results I would have expected from isDate().
Can anybody clarify if this is a problem with isDate() or my understanding of what it should do?
node:Static_Data
bretype:core::Static Data
editor:sortkey=5538bcc41e0b3f34
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
mydate:string
2015-04-01z
2014-02-27abc
b2014-02-27abc
2014-02-27a
2014-02-271234567895
2014-02-27
EOX
editor:XY=170,150
end:Static_Data
node:Filter_26
bretype:core::Filter
editor:sortkey=5538bce5058171f4
input:@40fd2c74167f1ca2/=Static_Data.40fe6c55598828e5
output:@40fd2c7420761db6/=
prop:Script=<<EOX
emit *, (isDate(mydate, "CCYY-MM-DD")) as result, (isDate(mydate, "CCYY-MM-DD") and mydate.len() == 10) as result2
EOX
editor:XY=330,150
end:Filter_26