[Jprogramming] How do I format a timestamp from the past?
Jimmy Gauvin
jimmy.gauvin at gmail.com
Tue Jan 23 16:00:47 UTC 2018
I was thinking of :
http://www.dyalog.com/50-years-of-apl.htm
but that is 1966-11-27 15.53.59 (GMT-7)
which is a couple years off target :
https://www.theguardian.com/theguardian/from-the-archive-blog/2011/jun/01/newspapers-national-newspapers
On Tue, Jan 23, 2018 at 9:16 AM, Roger Hui <rogerhui.canada at gmail.com>
wrote:
> Recognize the timestamp? :-) Google is fantastic -- it found the answer as
> the top hit.
>
>
> On Tue, Jan 23, 2018 at 6:06 AM, Raul Miller <rauldmiller at gmail.com>
> wrote:
>
> > '// :::' is more compact than (2 1 3#'/ :').
> >
> > Thanks,
> >
> > --
> > Raul
> >
> > On Tue, Jan 23, 2018 at 8:35 AM, Roger Hui <rogerhui.canada at gmail.com>
> > wrote:
> > > t=: 1969 7 21 2 56 0
> > >
> > > }: ; (2 1 3#'/ :') (,~,)&.> ('r<0>4.0';5$<'r<0>2.0') 8!:1 ,: t
> > > 1969/07/21 02:56:00
> > >
> > >
> > > On Mon, Jan 22, 2018 at 7:02 PM, Ian Clark <earthspotty at gmail.com>
> > wrote:
> > >
> > >> (6!:0 NIL) returns the current date/time as an integer 6-list
> timestamp.
> > >>
> > >> (6!:0 'hh:mm:ss MM/DD/YY') ditto, but in the specified format (y).
> > >>
> > >> How can I use the *selfsame* algorithm to format any (valid)
> timestamp?
> > >>
> > >> If the answer is "only by writing my own formatting verb, or by
> setting
> > the
> > >> system clock", might there be a case for extending (6!:0) to take an
> > >> optional (x)? Not just an integer 6-list timestamp as described, but a
> > few
> > >> other forms, like (_1) meaning yesterday.
> > >> ------------------------------------------------------------
> ----------
> > >> For information about J forums see http://www.jsoftware.com/
> forums.htm
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
More information about the Programming
mailing list