Reputation: 4161
{
"helloWorldOn": "Hello World on {date}",
"@helloWorldOn": {
"description": "A message with a date parameter",
"placeholders": {
"date": {
"type": "DateTime",
"format": "yMd"
}
}
}
}
I have two question
1- How can I extend formatter to add additional calendar and formats, like jyjMjd
for jalaali
calendar, Consider that I want to add additional formatter, I passed an DateTime
as argument and the formatter decides about calendar
2- How can I support additional type
, i.e. my own defined classes
Upvotes: 0
Views: 418
Reputation: 1468
I find the solution:
{
"helloWorldOn": "Hello World on {date}",
"@helloWorldOn": {
"description": "A message with a date parameter",
"placeholders": {
"date": {
"type": "DateTime",
"format": "yMd",
"isCustomDateFormat": "true"
}
}
}
}
Upvotes: 2