Re: [Jprogramming] time zones

2018-12-26 Thread Raul Miller
That (6!: foreign access to gmt strptime) would be a big help. And I guess it would also give us access to the time zone offset (using the difference between 6!:0'' and the gmt time). Thanks, -- Raul On Wed, Dec 26, 2018 at 6:41 PM bill lam wrote: > > It depends on which format of datetime th

Re: [Jprogramming] time zones

2018-12-26 Thread bill lam
It depends on which format of datetime that you are given to work with, and often you have no control over it. I am thinking of a new foreign conjunction like 6!:0 that can return datetime in utc and string in formats compatible with strftime. strptime is also helpful but it is not available on w

[Jprogramming] J string interpolation

2018-12-26 Thread Raul Miller
I know I've built something kind of like this before, but I couldn't find it, so... Here's a quicky little mechanism to support interpolation in strings in J: interp_fmt=:3 :0 }:;<@(LF,~dtb)"1]1 1}._1 _1}.": 2+ends-starts) {&.> befores rplc&(befores,.afters) y ) Example use: interp 'Exa

[Jprogramming] time zones

2018-12-26 Thread Raul Miller
I ran into a situation today, where I need to handle time zones in J. After poking around a bit, I found https://code.jsoftware.com/wiki/User:Ric_Sherlock/Extend_Dates_Project/DatesAdd_Script and http://www.jsoftware.com/pipermail/programming/2014-March/036357.html So, basically, here's my imp