TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Allow custom date format as part of locale (i.e. in language file)

3TUSK opened this issue ยท 1 comments

commented

Describe the request
In ICaldnearFormat, it currently has:

static String getTimeAndDate(int hour, int minute, Month month, int day, long years)
{
String monthName = TerraFirmaCraft.getProxy().getMonthName(month, false);
return String.format("%02d:%02d %s %02d, %04d", hour, minute, monthName, day, years);
}

this is currently used by /timetfc command. On success of execution, the mod gives the adjusted time as feedback.
A quick search reveals that this is also used elsewhere, e.g. barrel/vessel sealing date, calendar GUI, food expiry tooltip, etc..
I would like to see that the date format can be specified via language file for better internationalization support; right now, the format is Month/Day/Year which is not universal across the world. That said - is it possible to use I18n.format here?

Meta Info

  • TFC Version: 0.26.6.97 (at time of request)
  • Is this a compatibility feature for other mods? Or a enhancement for TFC alone? TFC alone.
  • If necessary, what other mods (including versions) would this require? N/A.
commented

No, it is not possible to use I18n.format, as that's a client side only method. That said, it would be possible to make this part of the proxy return