Menu

#1 Format exif values for display.

open
nobody
1
2002-07-03
2002-06-22
Jason Pell
No

Hi,

I had to to resort to using this javascript:

// Format: "2002:05:10 10:59:56"
function get_exif_date(datetime)
{
var re =
/^"([0-9]{4}):([0-9]{2}):([0-9]{2})\s([0-9]{2}):([0-9]{2}):([0-9]{2})"$/
if((matches = datetime.match(re)))
{
var year = matches[1];
var month = matches[2];
var day = matches[3];
var hours = matches[4];
var minutes = matches[5];
var seconds = matches[6];

return day+'/'+month+'/'+year+' '+hours+':'+minutes;
}
else
return "";
}

And this document.write:

<script
language="JavaScript">document.write(get_exif_date('%exif:datetime%'));
</script>

to get dates to display in a useable format.

It would be much nicer if you could provide a way to
manipulate these options. For example, what about a
format(%date%, 'DD/MM/YYYY') type format for the datetime.

Not sure how feasible this is.

Discussion

  • Jason Pell

    Jason Pell - 2002-06-23
    • labels: --> Interface Improvements (example)
     
  • Rob Vonk

    Rob Vonk - 2002-07-03

    Logged In: YES
    user_id=451789

    Even apart from the difficulty to add such scripting
    features to Exifgallery, it's hard to figure out all the
    date formats that are used in different cameras...

     
  • Rob Vonk

    Rob Vonk - 2002-07-03
    • priority: 5 --> 1
     

Log in to post a comment.