Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

James Moberg
James Moberg

Posted on

     

ColdFusion timeFormat Conversion Testing

I was prepping some tests for the awesomeLucee Spreadsheet library and came across an issue when one of my ID strings9A was autocast as a time09:00:00. I wasn't expecting this to happen as it didn't seem like a valid date/time string to me. I thought this could be easily fixed by adding a space9 A and it was still converted to a time. How about multiple spaces9 A... nope, it's still a valid time string?

Has anyone reviewed what valid and invalid strings theTimeFormat() tag can accept? I get different results when using Adobe ColdFusion versus Lucee... and that's a problem IMHO, but is it a bug or feature?

Adobe ColdFusion2016 /2018 Results:

"9" = NO "00:00:00.000""9A" = YES "09:00:00.000""9p" = YES "21:00:00.000""9#Chr(32)##Chr(32)##Chr(32)#A " = YES "09:00:00.000"" 9 A " = YES "09:00:00.000""23" = NO "00:00:00.000""15.4" = YES "09:36:00.000"
Enter fullscreen modeExit fullscreen mode

Lucee 5 Results:

"9" = false "00:00:00.000""9A" = false "ERROR""9p" = false "ERROR""9#Chr(32)##Chr(32)##Chr(32)#A " = false "ERROR"" 9 A " = false "ERROR""23" = false "00:00:00.000""15.4" = true "00:00:00.000"
Enter fullscreen modeExit fullscreen mode

Source Code

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

I’m a ColdFusion/CFML web application developer at SunStar Media located in Monterey, CA. I am a fan of technology, music and web development.
  • Location
    Monterey, CA
  • Work
    Web Applications Developer
  • Joined

More fromJames Moberg

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp