ifc

Outputs today's date in the International Fixed Calendar system

Privateunrated

Content

25 lines
{=(dt):{if({args}!=):{args}|{strf:%Y-%m-%d}} {strf:%H:%M:%S}}
{=(year):{strf({dt}):%Y}}
{=(yeartype):{any({m:trunc({year}%400)}==0|{all({m:trunc({year}%4)}==0|{m:trunc({year}%100)}!=0):true|false}==true):leapyear|regular}}
{=(DofY):{if({yeartype}==leapyear):{if({strf({dt}):%j}>169):{m:trunc({strf({dt}):%j}-1)}|{strf({dt}):%j}}|{strf({dt}):%j}}}

{=(mnum):{m:trunc(({DofY}-1)/28)}}
{=(dnum):{m:trunc((({DofY}-1)%28)+1)}}
{=(days):Sunday Monday Tuesday Wednesday Thursday Friday Saturday}
{=(months):February March April May June Sol July August September October November December January}
{=(regular):{if({DofY}==365):Year Day, December 29th|{days({m:trunc({dnum}%7)})}, {months({mnum})} {ord:{dnum}}}}
{=(leapyear):{if({strf({dt}):%j}==169):Leap Day, June 29th|{regular}}}
{=(dnum1):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{{yeartype}(0)}}}}}}
{=(dnum2):{if({dnum1}<10):0{dnum1}|{dnum1}}}
{=(monthlen):{index($):{replace(, ):{{yeartype}(-1)}$}}}

{=(cmonth):__‖`             {if({monthlen}<9): }{if({monthlen}<7): }{if({monthlen}<5): }{{yeartype}(-1)}{if({monthlen}<4): }{if({monthlen}<6): }{if({monthlen}<8): }               `‖__}
{=(calendar):{cmonth}
{replace(` {dnum2} `,__**` {dnum2} `**__):__‖` {join( `‖` ):Su Mo Tu We Th Fr Sa} `‖__
‖` {join( `‖` ):01 02 03 04 05 06 07} `‖
‖` {join( `‖` ):08 09 10 11 12 13 14} `‖
‖` {join( `‖` ):15 16 17 18 19 20 21} `‖
‖` {join( `‖` ):22 23 24 25 26 27 28{any({{yeartype}(-1)}==December|{all({yeartype}==leapyear|{{yeartype}(-1)}==June):true|false}==true): 29}} `‖}}

In the International Fixed Calendar, {if({strf({dt}):%Y-%m-%d}=={strf:%Y-%m-%d}):today|that date} is {{yeartype}} {year}
{calendar}
Raw JSON
{
  "id": 79781,
  "created_at": "2019-10-13T11:10:52.000Z",
  "tag_name": "ifc",
  "nsfw": false,
  "owner_id": "129419437911572480",
  "uses": 48,
  "description": "Outputs today's date in the International Fixed Calendar system",
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "518252334975811604",
  "sharer": "129419437911572480",
  "content": "{=(dt):{if({args}!=):{args}|{strf:%Y-%m-%d}} {strf:%H:%M:%S}}\n{=(year):{strf({dt}):%Y}}\n{=(yeartype):{any({m:trunc({year}%400)}==0|{all({m:trunc({year}%4)}==0|{m:trunc({year}%100)}!=0):true|false}==true):leapyear|regular}}\n{=(DofY):{if({yeartype}==leapyear):{if({strf({dt}):%j}>169):{m:trunc({strf({dt}):%j}-1)}|{strf({dt}):%j}}|{strf({dt}):%j}}}\n\n{=(mnum):{m:trunc(({DofY}-1)/28)}}\n{=(dnum):{m:trunc((({DofY}-1)%28)+1)}}\n{=(days):Sunday Monday Tuesday Wednesday Thursday Friday Saturday}\n{=(months):February March April May June Sol July August September October November December January}\n{=(regular):{if({DofY}==365):Year Day, December 29th|{days({m:trunc({dnum}%7)})}, {months({mnum})} {ord:{dnum}}}}\n{=(leapyear):{if({strf({dt}):%j}==169):Leap Day, June 29th|{regular}}}\n{=(dnum1):{replace(st,):{replace(nd,):{replace(rd,):{replace(th,):{{yeartype}(0)}}}}}}\n{=(dnum2):{if({dnum1}<10):0{dnum1}|{dnum1}}}\n{=(monthlen):{index($):{replace(, ):{{yeartype}(-1)}$}}}\n\n{=(cmonth):__‖`             {if({monthlen}<9): }{if({monthlen}<7): }{if({monthlen}<5): }{{yeartype}(-1)}{if({monthlen}<4): }{if({monthlen}<6): }{if({monthlen}<8): }               `‖__}\n{=(calendar):{cmonth}\n{replace(` {dnum2} `,__**` {dnum2} `**__):__‖` {join( `‖` ):Su Mo Tu We Th Fr Sa} `‖__\n‖` {join( `‖` ):01 02 03 04 05 06 07} `‖\n‖` {join( `‖` ):08 09 10 11 12 13 14} `‖\n‖` {join( `‖` ):15 16 17 18 19 20 21} `‖\n‖` {join( `‖` ):22 23 24 25 26 27 28{any({{yeartype}(-1)}==December|{all({yeartype}==leapyear|{{yeartype}(-1)}==June):true|false}==true): 29}} `‖}}\n\nIn the International Fixed Calendar, {if({strf({dt}):%Y-%m-%d}=={strf:%Y-%m-%d}):today|that date} is {{yeartype}} {year}\n{calendar}",
  "embed": "{}",
  "last_fetched": "2026-10-20T20:38:46.625Z"
}