<?php
//Voor Windows: setlocale(LC_TIME, 'nld_NLD');
setlocale(LC_TIME, 'nl_NL');

function nederlandseDatum($timestamp) {
    if(strftime('%x', $timestamp) == strftime('%x')) {
        $nederlandseDatum = 'Vandaag - ' . strftime('%H:%M', $timestamp);
    }
    elseif(strftime('%x', strtotime('+1 day', $timestamp)) == strftime('%x')) {
        $nederlandseDatum = 'Gisteren - ' . strftime('%H:%M', $timestamp);
    }
    elseif(strftime('%x', strtotime('+2 day', $timestamp)) == strftime('%x')) {
        $nederlandseDatum = 'Eergisteren - ' . strftime('%H:%M', $timestamp);
    }
    else {
        $nederlandseDatum = date('j ', $timestamp) . strftime('%B %Y - %H:%M', $timestamp);
    }
    return $nederlandseDatum;
}
?>