timecon

Privateunrated

Content

89 lines
{=(comment):Put your Carl-bot prefix below in the variable for a customized error message}
{=(prefix):&}
{=(tagname):timecon}

{=(comment):where the math and formatting are done}
{=(h):3600}
{=(format):%A %B %d, %Y at %-I:%M %p}

{=(comment):<---------DO NOT TOUCH ANYTHING BELOW THIS POINT--------->}

{=(comment):The list of timezones and houroffsets are paired by value index locations.}
{=(abbrvs):null~ACDT~ACST~ACT~ACWST~ADT~AEDT~AEST~AFT~AKDT~AKST~ALMT~AMST~null~AMT~ANAT~AQTT~ART~null~AST~AWST~AZOST~AZOT~AZT~BDT~BIOT~BIT~BOT~BRST~BRT~null~null~BST~BTT~CAT~CCT~CDT~null~CEST~CET~CHADT~CHAST~CHOT~CHOST~CHST~CHUT~CIST~CIT~CKT~CLST~CLT~COST~COT~CST~null~null~CT~CVT~CWST~CXT~DAVT~DDUT~DFT~EASST~EAST~EAT~null~ECT~EDT~EEST~EET~EGST~EGT~EIT~EST~FET~FJT~FKST~FKT~FNT~GALT~GAMT~GET~GFT~GILT~GIT~GMT~null~GST~GYT~HDT~HAEC~HST~HKT~HMT~HOVT~ICT~IDLW~IDT~IOT~IRDT~IRKT~IRST~IST~null~null~JST~KALT~KGT~KOST~KRAT~KST~LHDT~LHST~LINT~MAGT~MART~MAWT~MDT~MET~MEST~MHT~MIST~MIT~MMT~MSK~null~MST~MUT~MVT~MYT~NCT~NDT~NFT~NOVT~NPT~NST~NT~NUT~NZDT~NZST~OMST~ORAT~PDT~PET~PETT~PGT~PHOT~PHT~PKT~PMDT~PMST~PONT~PST~null~PYST~PYT~RET~ROTT~SAKT~SAMT~SAST~SBT~SCT~SDT~SGT~SLST~SRET~SRT~SST~null~SYOT~TAHT~THA~TFT~TJT~TKT~TLT~TMT~TRT~TOT~TVT~ULAST~ULAT~UTC~UYST~UYT~UZT~VET~VLAT~VOLT~VOST~VUT~WAKT~WAST~WAT~WEST~WET~WIT~WGST~WGT~WST~YAKT~YEKT}


{=(offsets):10.5~9.5~-5~8.75~-3~11~10~4.5~-8~-9~6~-3~-4~4~12~5~-3~3~-4~8~0~-1~4~8~6~-12~-4~-2~-3~6~11~1~6~2~6.5~-5~-4~2~1~13.75~12.75~8~9~10~10~-8~8~-10~-3~-4~-4~-5~-6~8~-5~8~-1~8.75~7~7~10~1~-5~-6~3~-4~-5~-4~3~2~0~-1~9~-5~3~12~-3~-4~-2~-6~-9~4~-3~12~-9~0~-2~4~-4~-9~2~-10~8~5~7~7~-12~3~3~4.5~8~3.5~5.5~1~2~9~2~6~11~7~9~11~10.5~14~12~-9.5~5~-6~1~2~12~11~-9.5~6.5~3~8~-7~4~5~8~11~-2.5~11~7~5.75~-3.5~-3.5~-11~13~12~6~5~-7~-5~12~10~13~8~5~-2~-3~11~-8~8~-3~-4~4~-3~11~4~2~11~4~-10~8~5.5~11~-3~-11~8~3~-10~7~5~5~13~9~5~3~13~12~9~8~0~-2~-3~5~-4~10~4~6~11~12~2~1~1~0~7~-2~-3~8~9~5}

{=(uargs1):{upper:{args(1)}}}
{=(uargs2):{upper:{args(2)}}}

{=(largs1):{lower:{args(1)}}}


{=(abbrdetection1):{contains({uargs1}):{replace(~, ):{abbrvs}}}}
{=(abbrdetection2):{contains({uargs2}):{replace(~, ):{abbrvs}}}}


{=(osindex1):{if({abbrdetection1}==true):{index({uargs1}):{replace(~, ):{abbrvs}}}|-1}}
{=(osindex2):{if({abbrdetection2}==true):{index({uargs2}):{replace(~, ):{abbrvs}}}|-1}}

{=(currentTime):{m:trunc({unix}+(3600*{offsets({osindex1}):~}))}}

{=(time):{replace(.,:):{args(3)}}}
{=(date):{replace(/,-):{if({args(4)}==tomorrow):{strf({m:trunc({currentTime}+86400)}):%Y-%m-%d}|{args(4)}}}}

{=(time_in_num):{replace(0,1):{replace(:,):{time}}}}
{=(timeornot):{if({time_in_num}=={m:trunc({time_in_num}/1)}):true|false}}

{=(date_in_num):{replace(/,):{replace(-,):{replace(0,1):{date}}}}}
{=(dateornot):{if({date_in_num}=={m:trunc({date_in_num}/1)}):true|false}}


{=(le_time):{index(ƃ&):{replace(ƃ, ):{join(ƃ):{replace(, ):{replace(:,):{time}}}}} ƃ&}}

{=(le_date):{index(ƃ&):{replace(ƃ, ):{join(ƃ):{replace(, ):{replace(-,):{date}}}}} ƃ&}}

{=(current_month):{strf({currentTime}):%m}}
{=(current_year):{strf({currentTime}):%Y}}

{=(time):{all({le_time}<3|{in(:):{time}}==false):{time}:00:00|{time}:00}}

{=(date):{if({dateornot}==false):{strf({currentTime}):%Y-%m-%d}|{all({le_date}<3|{in(-):{date}}==false):{current_year}-{current_month}-{date}|{if({le_date}<6):{current_year}-{date}|{date}}}}}

{=(le_args):{index(ƃ&):{args} ƃ&}}

{=(setTime):{strf({if({le_args}==2):{currentTime}|{date} {time}}):%s}}

{=(help):**Time Converter TAG** : 
This tags convert the given time and date from one Timezone to another.
__**How to use it?**__
**Syntaz** : `{prefix}{tagname} <Timezone_1> <Timezone_2> [Time_in_24_hours_clock_in_TIMEZONE_1] [Any_Date]`

Formats :
Time : `HH:MM` format or only `HH`
Date : `yyyy-mm-dd` or `mm-dd` or `mm/dd` or `dd` or `tomorrow`

**Examples** : 
1️⃣  `{prefix}{tagname} ist utc 23:59 2020-12-31`
>> Converting time from IST to UTC.
2️⃣  `{prefix}{tagname} pst ist 20 08/15`
>> August 15 of current year.
3️⃣  `{prefix}{tagname} IST Pst 20 15`
>> Here 15th of the current month.
4️⃣  `{prefix}{tagname} pst ist 20`
>> If no date is mentioned then it will takes todays date.
5️⃣  `{prefix}{tagname} pst ist`
If Date and time is not mentioned it will take current date and time.

More options:
__To see all available Timezones use__ : `{prefix}{tagname} timezones`.

Tag by Tush with help from Raffael.}

{=(timezonesList):These are the available [timezone abbreviations](https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations "Duplicates point to whichever a Google search decided was correct"):
`{join(`, `):{replace(~, ):{replace(null,):{abbrvs}}}}`}

{=(error):Your input did not match a abbreviation. Use `{prefix}{tagname} help` for help and options `list` or `timezones` list of timezones, or see this [Wikipedia List](https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations "Duplicates point to whichever a Google search decided was correct").}

{=(output):{if({largs1}==help):{help}|{any({largs1}==list|{largs1}==abbr|{largs1}==abbrev|{largs1}==timezones):{timezonesList}|{any({osindex1}==-1|{osindex2}==-1):{error}|**{upper:{args(1)}} Time** : {strf({setTime}):%A %B %d, %Y at %-I:%M %p}
**{upper:{args(2)}} Time** : {strf({m:trunc({setTime}-({h}*{offsets({osindex1}):~})+({h}*{offsets({osindex2}):~}))}):{format}}}}}}

Embed

1 line
{"color": 3553599, "thumbnail": {"url": "https://cdn.discordapp.com/attachments/662550963789234177/885857108023738378/71FGqEh7vL.png"}, "description": "{output}\n\nRun : `{prefix}{tagname} help` for help"}
Raw JSON
{
  "id": 1236287,
  "created_at": "2022-04-26T10:37:52.864Z",
  "tag_name": "timecon",
  "nsfw": false,
  "owner_id": "659360227304669184",
  "uses": 17,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "740102523716763668",
  "sharer": "659360227304669184",
  "content": "{=(comment):Put your Carl-bot prefix below in the variable for a customized error message}\n{=(prefix):&}\n{=(tagname):timecon}\n\n{=(comment):where the math and formatting are done}\n{=(h):3600}\n{=(format):%A %B %d, %Y at %-I:%M %p}\n\n{=(comment):<---------DO NOT TOUCH ANYTHING BELOW THIS POINT--------->}\n\n{=(comment):The list of timezones and houroffsets are paired by value index locations.}\n{=(abbrvs):null~ACDT~ACST~ACT~ACWST~ADT~AEDT~AEST~AFT~AKDT~AKST~ALMT~AMST~null~AMT~ANAT~AQTT~ART~null~AST~AWST~AZOST~AZOT~AZT~BDT~BIOT~BIT~BOT~BRST~BRT~null~null~BST~BTT~CAT~CCT~CDT~null~CEST~CET~CHADT~CHAST~CHOT~CHOST~CHST~CHUT~CIST~CIT~CKT~CLST~CLT~COST~COT~CST~null~null~CT~CVT~CWST~CXT~DAVT~DDUT~DFT~EASST~EAST~EAT~null~ECT~EDT~EEST~EET~EGST~EGT~EIT~EST~FET~FJT~FKST~FKT~FNT~GALT~GAMT~GET~GFT~GILT~GIT~GMT~null~GST~GYT~HDT~HAEC~HST~HKT~HMT~HOVT~ICT~IDLW~IDT~IOT~IRDT~IRKT~IRST~IST~null~null~JST~KALT~KGT~KOST~KRAT~KST~LHDT~LHST~LINT~MAGT~MART~MAWT~MDT~MET~MEST~MHT~MIST~MIT~MMT~MSK~null~MST~MUT~MVT~MYT~NCT~NDT~NFT~NOVT~NPT~NST~NT~NUT~NZDT~NZST~OMST~ORAT~PDT~PET~PETT~PGT~PHOT~PHT~PKT~PMDT~PMST~PONT~PST~null~PYST~PYT~RET~ROTT~SAKT~SAMT~SAST~SBT~SCT~SDT~SGT~SLST~SRET~SRT~SST~null~SYOT~TAHT~THA~TFT~TJT~TKT~TLT~TMT~TRT~TOT~TVT~ULAST~ULAT~UTC~UYST~UYT~UZT~VET~VLAT~VOLT~VOST~VUT~WAKT~WAST~WAT~WEST~WET~WIT~WGST~WGT~WST~YAKT~YEKT}\n\n\n{=(offsets):10.5~9.5~-5~8.75~-3~11~10~4.5~-8~-9~6~-3~-4~4~12~5~-3~3~-4~8~0~-1~4~8~6~-12~-4~-2~-3~6~11~1~6~2~6.5~-5~-4~2~1~13.75~12.75~8~9~10~10~-8~8~-10~-3~-4~-4~-5~-6~8~-5~8~-1~8.75~7~7~10~1~-5~-6~3~-4~-5~-4~3~2~0~-1~9~-5~3~12~-3~-4~-2~-6~-9~4~-3~12~-9~0~-2~4~-4~-9~2~-10~8~5~7~7~-12~3~3~4.5~8~3.5~5.5~1~2~9~2~6~11~7~9~11~10.5~14~12~-9.5~5~-6~1~2~12~11~-9.5~6.5~3~8~-7~4~5~8~11~-2.5~11~7~5.75~-3.5~-3.5~-11~13~12~6~5~-7~-5~12~10~13~8~5~-2~-3~11~-8~8~-3~-4~4~-3~11~4~2~11~4~-10~8~5.5~11~-3~-11~8~3~-10~7~5~5~13~9~5~3~13~12~9~8~0~-2~-3~5~-4~10~4~6~11~12~2~1~1~0~7~-2~-3~8~9~5}\n\n{=(uargs1):{upper:{args(1)}}}\n{=(uargs2):{upper:{args(2)}}}\n\n{=(largs1):{lower:{args(1)}}}\n\n\n{=(abbrdetection1):{contains({uargs1}):{replace(~, ):{abbrvs}}}}\n{=(abbrdetection2):{contains({uargs2}):{replace(~, ):{abbrvs}}}}\n\n\n{=(osindex1):{if({abbrdetection1}==true):{index({uargs1}):{replace(~, ):{abbrvs}}}|-1}}\n{=(osindex2):{if({abbrdetection2}==true):{index({uargs2}):{replace(~, ):{abbrvs}}}|-1}}\n\n{=(currentTime):{m:trunc({unix}+(3600*{offsets({osindex1}):~}))}}\n\n{=(time):{replace(.,:):{args(3)}}}\n{=(date):{replace(/,-):{if({args(4)}==tomorrow):{strf({m:trunc({currentTime}+86400)}):%Y-%m-%d}|{args(4)}}}}\n\n{=(time_in_num):{replace(0,1):{replace(:,):{time}}}}\n{=(timeornot):{if({time_in_num}=={m:trunc({time_in_num}/1)}):true|false}}\n\n{=(date_in_num):{replace(/,):{replace(-,):{replace(0,1):{date}}}}}\n{=(dateornot):{if({date_in_num}=={m:trunc({date_in_num}/1)}):true|false}}\n\n\n{=(le_time):{index(ƃ&):{replace(ƃ, ):{join(ƃ):{replace(, ):{replace(:,):{time}}}}} ƃ&}}\n\n{=(le_date):{index(ƃ&):{replace(ƃ, ):{join(ƃ):{replace(, ):{replace(-,):{date}}}}} ƃ&}}\n\n{=(current_month):{strf({currentTime}):%m}}\n{=(current_year):{strf({currentTime}):%Y}}\n\n{=(time):{all({le_time}<3|{in(:):{time}}==false):{time}:00:00|{time}:00}}\n\n{=(date):{if({dateornot}==false):{strf({currentTime}):%Y-%m-%d}|{all({le_date}<3|{in(-):{date}}==false):{current_year}-{current_month}-{date}|{if({le_date}<6):{current_year}-{date}|{date}}}}}\n\n{=(le_args):{index(ƃ&):{args} ƃ&}}\n\n{=(setTime):{strf({if({le_args}==2):{currentTime}|{date} {time}}):%s}}\n\n{=(help):**Time Converter TAG** : \nThis tags convert the given time and date from one Timezone to another.\n__**How to use it?**__\n**Syntaz** : `{prefix}{tagname} <Timezone_1> <Timezone_2> [Time_in_24_hours_clock_in_TIMEZONE_1] [Any_Date]`\n\nFormats :\nTime : `HH:MM` format or only `HH`\nDate : `yyyy-mm-dd` or `mm-dd` or `mm/dd` or `dd` or `tomorrow`\n\n**Examples** : \n1️⃣  `{prefix}{tagname} ist utc 23:59 2020-12-31`\n>> Converting time from IST to UTC.\n2️⃣  `{prefix}{tagname} pst ist 20 08/15`\n>> August 15 of current year.\n3️⃣  `{prefix}{tagname} IST Pst 20 15`\n>> Here 15th of the current month.\n4️⃣  `{prefix}{tagname} pst ist 20`\n>> If no date is mentioned then it will takes todays date.\n5️⃣  `{prefix}{tagname} pst ist`\nIf Date and time is not mentioned it will take current date and time.\n\nMore options:\n__To see all available Timezones use__ : `{prefix}{tagname} timezones`.\n\nTag by Tush with help from Raffael.}\n\n{=(timezonesList):These are the available [timezone abbreviations](https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations \"Duplicates point to whichever a Google search decided was correct\"):\n`{join(`, `):{replace(~, ):{replace(null,):{abbrvs}}}}`}\n\n{=(error):Your input did not match a abbreviation. Use `{prefix}{tagname} help` for help and options `list` or `timezones` list of timezones, or see this [Wikipedia List](https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations \"Duplicates point to whichever a Google search decided was correct\").}\n\n{=(output):{if({largs1}==help):{help}|{any({largs1}==list|{largs1}==abbr|{largs1}==abbrev|{largs1}==timezones):{timezonesList}|{any({osindex1}==-1|{osindex2}==-1):{error}|**{upper:{args(1)}} Time** : {strf({setTime}):%A %B %d, %Y at %-I:%M %p}\n**{upper:{args(2)}} Time** : {strf({m:trunc({setTime}-({h}*{offsets({osindex1}):~})+({h}*{offsets({osindex2}):~}))}):{format}}}}}}",
  "embed": "{\"color\": 3553599, \"thumbnail\": {\"url\": \"https://cdn.discordapp.com/attachments/662550963789234177/885857108023738378/71FGqEh7vL.png\"}, \"description\": \"{output}\\n\\nRun : `{prefix}{tagname} help` for help\"}",
  "last_fetched": "2026-10-20T18:17:35.442Z"
}