juxt

Ben Halton 2021-09-23T11:38:57.037800Z

Hi - I've upgraded tick form 0.4.2.6-alpha to 0.4.3.2, my app is now blowing up. I used to used things like (tick/date "2021-09-23T14:16:00") to get the date part and (tick/time "2021-09-23T14:16:00") to get the time part but it seems unhappy about this now

Ben Halton 2021-09-23T11:39:40.038400Z

am I missing something, is this deliberate, what's recommended practice here now ?

Ben Halton 2021-09-23T11:40:09.039Z

it works if I do (tick/date (tick/date-time "2021-09-23T14:16:00"))

Ben Halton 2021-09-23T11:42:53.039600Z

I guess before I just hack in the fix I wanted to see if I had missed something

Ben Halton 2021-09-23T12:06:38.040600Z

hmm looking at the docs I see any reference to calling time on a date-time string so maybe that just kinda happened to work

Ben Halton 2021-09-23T12:39:23.041600Z

appreciate I'm talking to myself at the moment but it seems like the version of js-joda/core required has gone from 1.x to 3.x so maybe that explains it

2021-09-23T12:56:12.044700Z

hi Ben. yes previously the parsing had a good go at working out what your string might be. this was very slow and might result in surprising behaviour. so, assuming you know the format of your input string, as you suggest, you should create the entity it corresponds to (date-time, in your case) then extract the bit you want. so, yes (tick/date (tick/date-time "2021-09-23T14:16:00"))`` is the right way to do it now.

Ben Halton 2021-09-23T13:02:18.046Z

gotcha thanks. I guess the problem I have now is working out where I need to convert to a date-time and when I just have dates which will teach me to write tests 😉