Just found myself needing to write some tag-based ...
# cfml-general
a
Just found myself needing to write some tag-based code and had to look up how
<cfloop>
worked. HA
r
it's always DateCompare() for me. Have to look up which way round the dates go, EVERY TIME.
1
a
Oh there's one of those date functions that takes two dates and a date part that works the other way around when yer using the member function version
r
EXACTLY!
w
😭
a
OMFG, it gets worse. Check this: https://trycf.com/gist/6b8c3781b35bde561230adf576ac2e96/acf2021?theme=monokai
Copy code
dad = createDate(1970,2,17)    
boy = createDate(2011,3,24)

writeDump([
    dateDiff("yyyy", dad, boy), // both: 41
    dad.diff("yyyy", boy) // CF: -41 / Lucee: 41
])
So CF fails cos they're muppets. Lucee fails cos they're not muppets, but kinda ought tobe
😞 3
@ryan yes I was hoping you'd see that and have a chuckle.
r
haha, yep!
Hope all is well, buddy 🙂
a
@Mark Takata (Adobe) that frickin stupid behaviour in CF is another example of "it's not a bug, we meant to do it that way" (same Adobe dev too, I think), not quite understanding that "the way you meant to do it was wrong" so it's still a bloody bug.
m
Been a while since I was on a date Adam. Should have posted yesterday to keep in Valentine's theme imo.
😂 1
a
Who's Big Daddy and who's The Boy in this particular scenario you're thinking of, fella?
😂 1
My problem with CFLOOP was trying to loop over a struct using array syntax. Cos I'm a div. Can't really blame CFML for that.
👍 1
👍🏼 1
m
Please note VERY IMPORTANT that the proper pronunciation is "SEE FLOOP". OK you may continue on your regularly scheduled CFLIFE.
👍 1
👍🏼 1
😆 3
a
I am so gonna say "see floop" from now on.