Jump to:

23550 Posts in 19336 Topics by 2890 members

General Questions

SilverStripe Forums » General Questions » [Solved] SS 3.03 - Date format nog working

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 713 Views
  • borriej
    Community Member
    267 Posts

    [Solved] SS 3.03 - Date format nog working Link to this post


    $Date.FormatI18N(%e %b %Y)


    setlocale(LC_ALL, 'nl_NL');
    setlocale(LC_TIME, 'nl_NL.UTF-8');

    should result in "17 Dec 2012"
    instead i get an error: "Missing argument 1 for Date::FormatI18N()"

    [Warning] Missing argument 1 for Date::FormatI18N(), called in /storage/web/public/sites/new.url.nl/framework/view/ViewableData.php on line 366 and defined
    GET /blog/?flush=all
    Line 149 in /storage/web/public/sites/new.url.nl/framework/model/fieldtypes/Date.php

    a test on the server, using test.php

    echo strftime("%e %b %Y");

    does result in 17 dec 2012, so i think the server is set correctly..

    is something wrong with this in SS 3.03?
    i saw "dospuntocero" also had problems in SS 3, see the irc logs: http://logs.simon.geek.nz/index.php?date=2012-07-05

    How do we fix this?

    Use $Date.FormatI18N('%e %b %Y')

  • sashion
    Community Member
    23 Posts

    Re: [Solved] SS 3.03 - Date format nog working Link to this post

    Thanks for that one. Just stumpled over it trying to update from SS2.4.5 to SS3.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.