← Back to team overview

geda-developers team mailing list archive

Re: geda-gaf on FreeBSD and probably other architectures

 

OK, the line in question was
  d=`LANG=C date -d $(DATE_VERSION) "+%B %-d, %Y"` ; \

I've written two scripts, one is combination of sed and awk:

  echo DATE_VERSION | sed 's/\(....\)\(..\)\(..\)/\1 \2 \3 00 00 00/' |
                      LANG=C awk '{print (strftime ("%B %-d, %Y", mktime ($0)))}'

and the other is in Guile:

  (setlocale LC_ALL "C")
  (display
    (strftime "%B %-d, %Y"
      (car (strptime "%Y%m%d" (cadr (program-arguments))))))

which will be invoked then something like this
  guile date.scm DATE_VERSION


Which would be better to use?

Any simplifications/improvements are apreciated.

Cheers,
  Vladimir


Follow ups

References