Date format

Hi!

Is there a filter to change the date format to YYYY-MM-DD? And if not, can I
write my own? How?

/Mattias

Hi!

I think if your use

[(#DATE|affdate )]

it should work if the filter are not translated...

Le dimanche 5 octobre 2003, à 09:09 , Mattias Nyrell a écrit :

Hi!

Is there a filter to change the date format to YYYY-MM-DD? And if not, can I
write my own? How?

/Mattias
_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

[peg ]

German date format:
[(#DATE|jour)]. [(#DATE|nom_mois)] [(#DATE|annee)], [(#DATE|heures)]:[(#DATE|minutes)]
You may chage this to fit your needs.
Provided you adjusted the internal language to "english" this will give you a fully
understandable date.
cf. La gestion des dates - SPIP
Sincerely,
Klaus.

Hi!

I think if your use

[(#DATE|affdate )]

it should work if the filter are not translated...

Le dimanche 5 octobre 2003, à 09:09 , Mattias Nyrell a écrit :

> Hi!
>
> Is there a filter to change the date format to YYYY-MM-DD? And if
> not, can I write my own? How?
>
> /Mattias
> _______________________________________________
> spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en
>

[peg ]

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

ok thanks everyone!

German date format:
[(#DATE|jour)]. [(#DATE|nom_mois)] [(#DATE|annee)],
[(#DATE|heures)]:[(#DATE|minutes)] You may chage this to fit your needs.
Provided you adjusted the internal language to "english" this will give you
a fully understandable date.

I tried that but couldn't get closer to YYYY-MM-DD than "YYYY-MM-D th", so I
had to make my own filter.

This is the result if anyone else need it:

function YYYYMMDD($date) {
    $timestamp = strtotime($date);
    return date("Y-m-d", $timestamp);
}

/Mattias

On Monday 06 October 2003 09.17, klaus@spip.de wrote:

German date format:
[(#DATE|jour)]. [(#DATE|nom_mois)] [(#DATE|annee)],
[(#DATE|heures)]:[(#DATE|minutes)] You may chage this to fit your needs.
Provided you adjusted the internal language to "english" this will give you
a fully understandable date.
cf. La gestion des dates - SPIP
Sincerely,
Klaus.

> Hi!
>
> I think if your use
>
> [(#DATE|affdate )]
>
> it should work if the filter are not translated...
>
> Le dimanche 5 octobre 2003, à 09:09 , Mattias Nyrell a écrit :
> > Hi!
> >
> > Is there a filter to change the date format to YYYY-MM-DD? And if
> > not, can I write my own? How?
> >
> > /Mattias
> > _______________________________________________
> > spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en
>
> [peg ]
>
> _______________________________________________
> spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en