Output the date in the Mel calendarValiDate ISO 8601 by RXResolving the Date Format DisputeRollover CalendarForgotten Realms date calculatorRoman-style date formattingFriday the 13thBeat Pure Regular Expressions at Validating ISO 8601 DatesThe Last MondayWhat's the Date?Date Occurrences

Is there an idiom that means "revealing a secret unintentionally"?

Was the Highlands Ranch shooting the 115th mass shooting in the US in 2019

How to find the transfer orbit from a initial circular orbit to a final elliptical orbit

Why is there a cap on 401k contributions?

Gift for mentor after his thesis defense?

Does a surprised creature obey the 1st level spell Command?

Why use steam instead of just hot air?

Can I use a 11-23 11-speed shimano cassette with the RD-R8000 11-speed Ultegra Shadow Rear Derailleur (short cage)?

Is it a good idea to copy a trader when investing?

What dice to use in a game that revolves around triangles?

Why is it wrong to *implement* myself a known, published, widely believed to be secure crypto algorithm?

How to get MAX value using SOQL when there are more than 50,000 rows

Was Mohammed the most popular first name for boys born in Berlin in 2018?

How can it be that ssh somename works, while nslookup somename does not?

Which spells are in some way related to shadows or the Shadowfell?

Why does the electron wavefunction not collapse within atoms at room temperature in gas, liquids or solids due to decoherence?

What does the "DS" in "DS-..." US visa application forms stand for?

Rusty Chain and back cassette – Replace or Repair?

Double underlining a result in a system of equations with calculation steps on the right side

When do you stop "pushing" a book?

Does Thread.yield() do anything if we have enough processors to service all threads?

Do Monks gain the 9th level Unarmored Movement benefit when wearing armor or using a shield?

My perfect evil overlord plan... or is it?

TeX Gyre Pagella Math Integral sign much too small



Output the date in the Mel calendar


ValiDate ISO 8601 by RXResolving the Date Format DisputeRollover CalendarForgotten Realms date calculatorRoman-style date formattingFriday the 13thBeat Pure Regular Expressions at Validating ISO 8601 DatesThe Last MondayWhat's the Date?Date Occurrences













3












$begingroup$


The Mel calendar is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar.



This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, or divisible by 400 has 366 days, and other years have 365 (i.e. our leap year rules, but with years in the Mel calendar).



You should use the month and day name abbreviations:



months: dia vio lis gil ful dyu mel ral zan pal mik fav ruj



days: dia vio lis gil ful dyu mel ral zan pal mik fav ruj ser rav tan lin rez jil din ket len lax nen pin mat kun mir



The extra days outside of any month have the month name of myuxet (no abbreviation here), and the day names are axet and teems, respectively.



0 dia dia is 1988/11/30.



You can take the input date as a string or a (year, month, day) tuple; alternatively, for functions, the parameter can be in your standard library's date type. The output should be a space-separated string.



Test cases



1776-07-04 => -213 ral ket
1859-12-15 => -129 dia rav
1917-04-14 => -72 ful nen
1981-02-04 => -8 lis mik
1988-11-30 => 0 dia dia
1988-12-01 => 0 dia vio
1988-12-28 => 0 vio dia
2017-01-01 => 28 vio ful
2019-04-22 => 30 dyu lis
2019-11-30 => 30 myuxet axet
2019-12-01 => 31 dia dia
2021-11-29 => 32 myuxet axet
2021-11-30 => 32 myuxet teems
2089-11-30 => 101 dia dia
2389-11-30 => 400 myuxet teems


Reference implementation in Perl 6



Standard loopholes are forbidden.










share|improve this question











$endgroup$







  • 3




    $begingroup$
    You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
    $endgroup$
    – Embodiment of Ignorance
    47 mins ago










  • $begingroup$
    It has to be a space-separated string.
    $endgroup$
    – bb94
    14 mins ago










  • $begingroup$
    Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
    $endgroup$
    – Embodiment of Ignorance
    10 mins ago










  • $begingroup$
    Yes, that's fine.
    $endgroup$
    – bb94
    9 mins ago















3












$begingroup$


The Mel calendar is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar.



This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, or divisible by 400 has 366 days, and other years have 365 (i.e. our leap year rules, but with years in the Mel calendar).



You should use the month and day name abbreviations:



months: dia vio lis gil ful dyu mel ral zan pal mik fav ruj



days: dia vio lis gil ful dyu mel ral zan pal mik fav ruj ser rav tan lin rez jil din ket len lax nen pin mat kun mir



The extra days outside of any month have the month name of myuxet (no abbreviation here), and the day names are axet and teems, respectively.



0 dia dia is 1988/11/30.



You can take the input date as a string or a (year, month, day) tuple; alternatively, for functions, the parameter can be in your standard library's date type. The output should be a space-separated string.



Test cases



1776-07-04 => -213 ral ket
1859-12-15 => -129 dia rav
1917-04-14 => -72 ful nen
1981-02-04 => -8 lis mik
1988-11-30 => 0 dia dia
1988-12-01 => 0 dia vio
1988-12-28 => 0 vio dia
2017-01-01 => 28 vio ful
2019-04-22 => 30 dyu lis
2019-11-30 => 30 myuxet axet
2019-12-01 => 31 dia dia
2021-11-29 => 32 myuxet axet
2021-11-30 => 32 myuxet teems
2089-11-30 => 101 dia dia
2389-11-30 => 400 myuxet teems


Reference implementation in Perl 6



Standard loopholes are forbidden.










share|improve this question











$endgroup$







  • 3




    $begingroup$
    You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
    $endgroup$
    – Embodiment of Ignorance
    47 mins ago










  • $begingroup$
    It has to be a space-separated string.
    $endgroup$
    – bb94
    14 mins ago










  • $begingroup$
    Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
    $endgroup$
    – Embodiment of Ignorance
    10 mins ago










  • $begingroup$
    Yes, that's fine.
    $endgroup$
    – bb94
    9 mins ago













3












3








3





$begingroup$


The Mel calendar is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar.



This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, or divisible by 400 has 366 days, and other years have 365 (i.e. our leap year rules, but with years in the Mel calendar).



You should use the month and day name abbreviations:



months: dia vio lis gil ful dyu mel ral zan pal mik fav ruj



days: dia vio lis gil ful dyu mel ral zan pal mik fav ruj ser rav tan lin rez jil din ket len lax nen pin mat kun mir



The extra days outside of any month have the month name of myuxet (no abbreviation here), and the day names are axet and teems, respectively.



0 dia dia is 1988/11/30.



You can take the input date as a string or a (year, month, day) tuple; alternatively, for functions, the parameter can be in your standard library's date type. The output should be a space-separated string.



Test cases



1776-07-04 => -213 ral ket
1859-12-15 => -129 dia rav
1917-04-14 => -72 ful nen
1981-02-04 => -8 lis mik
1988-11-30 => 0 dia dia
1988-12-01 => 0 dia vio
1988-12-28 => 0 vio dia
2017-01-01 => 28 vio ful
2019-04-22 => 30 dyu lis
2019-11-30 => 30 myuxet axet
2019-12-01 => 31 dia dia
2021-11-29 => 32 myuxet axet
2021-11-30 => 32 myuxet teems
2089-11-30 => 101 dia dia
2389-11-30 => 400 myuxet teems


Reference implementation in Perl 6



Standard loopholes are forbidden.










share|improve this question











$endgroup$




The Mel calendar is used in the fictional world of Kaldia. Your goal is to convert dates into the Mel calendar.



This calendar has 13 months of 28 days each, plus 1 or 2 extra days after the last month. A year that is divisible by 4 but not by 100, or divisible by 400 has 366 days, and other years have 365 (i.e. our leap year rules, but with years in the Mel calendar).



You should use the month and day name abbreviations:



months: dia vio lis gil ful dyu mel ral zan pal mik fav ruj



days: dia vio lis gil ful dyu mel ral zan pal mik fav ruj ser rav tan lin rez jil din ket len lax nen pin mat kun mir



The extra days outside of any month have the month name of myuxet (no abbreviation here), and the day names are axet and teems, respectively.



0 dia dia is 1988/11/30.



You can take the input date as a string or a (year, month, day) tuple; alternatively, for functions, the parameter can be in your standard library's date type. The output should be a space-separated string.



Test cases



1776-07-04 => -213 ral ket
1859-12-15 => -129 dia rav
1917-04-14 => -72 ful nen
1981-02-04 => -8 lis mik
1988-11-30 => 0 dia dia
1988-12-01 => 0 dia vio
1988-12-28 => 0 vio dia
2017-01-01 => 28 vio ful
2019-04-22 => 30 dyu lis
2019-11-30 => 30 myuxet axet
2019-12-01 => 31 dia dia
2021-11-29 => 32 myuxet axet
2021-11-30 => 32 myuxet teems
2089-11-30 => 101 dia dia
2389-11-30 => 400 myuxet teems


Reference implementation in Perl 6



Standard loopholes are forbidden.







code-golf date






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 mins ago







bb94

















asked 2 hours ago









bb94bb94

1,307714




1,307714







  • 3




    $begingroup$
    You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
    $endgroup$
    – Embodiment of Ignorance
    47 mins ago










  • $begingroup$
    It has to be a space-separated string.
    $endgroup$
    – bb94
    14 mins ago










  • $begingroup$
    Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
    $endgroup$
    – Embodiment of Ignorance
    10 mins ago










  • $begingroup$
    Yes, that's fine.
    $endgroup$
    – bb94
    9 mins ago












  • 3




    $begingroup$
    You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
    $endgroup$
    – Embodiment of Ignorance
    47 mins ago










  • $begingroup$
    It has to be a space-separated string.
    $endgroup$
    – bb94
    14 mins ago










  • $begingroup$
    Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
    $endgroup$
    – Embodiment of Ignorance
    10 mins ago










  • $begingroup$
    Yes, that's fine.
    $endgroup$
    – bb94
    9 mins ago







3




3




$begingroup$
You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
$endgroup$
– Embodiment of Ignorance
47 mins ago




$begingroup$
You should probably include in your post that axet and teems are at the end of the year, I was confused until I looked at the link
$endgroup$
– Embodiment of Ignorance
47 mins ago












$begingroup$
It has to be a space-separated string.
$endgroup$
– bb94
14 mins ago




$begingroup$
It has to be a space-separated string.
$endgroup$
– bb94
14 mins ago












$begingroup$
Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
$endgroup$
– Embodiment of Ignorance
10 mins ago




$begingroup$
Can we take input as a three value named tuple or a list of three values each signifying year, month, and day?
$endgroup$
– Embodiment of Ignorance
10 mins ago












$begingroup$
Yes, that's fine.
$endgroup$
– bb94
9 mins ago




$begingroup$
Yes, that's fine.
$endgroup$
– bb94
9 mins ago










2 Answers
2






active

oldest

votes


















1












$begingroup$


Ruby, 199 bytes



Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


Try it online!






share|improve this answer









$endgroup$




















    1












    $begingroup$


    Perl 6, 174 bytes





    [X]("diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".comb(3)xx 2)[^364],o*-726436


    Try it online!



    Generate a list of all the valid dates and then indexes the day of the year into that list.






    share|improve this answer











    $endgroup$













      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "200"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f185339%2foutput-the-date-in-the-mel-calendar%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1












      $begingroup$


      Ruby, 199 bytes



      Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





      ->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


      Try it online!






      share|improve this answer









      $endgroup$

















        1












        $begingroup$


        Ruby, 199 bytes



        Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





        ->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


        Try it online!






        share|improve this answer









        $endgroup$















          1












          1








          1





          $begingroup$


          Ruby, 199 bytes



          Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





          ->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


          Try it online!






          share|improve this answer









          $endgroup$




          Ruby, 199 bytes



          Oof, only 23 bytes saved over the sample Perl code... I blame the fact that I have to subtract a bigger number due to using a Time class instead of what I assume is a Date class in Perl. (AFAIK importing Ruby's Date class is 2 bytes longer)





          ->dd-=62764070400;y=d.yday;m=y/28;s="diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".scan /.../;[d.year,m<13?s[m]:"myuxet",(m<13?s:%w[axet teems])[y%28-1]]*' '


          Try it online!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 57 mins ago









          Value InkValue Ink

          7,895731




          7,895731





















              1












              $begingroup$


              Perl 6, 174 bytes





              [X]("diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".comb(3)xx 2)[^364],o*-726436


              Try it online!



              Generate a list of all the valid dates and then indexes the day of the year into that list.






              share|improve this answer











              $endgroup$

















                1












                $begingroup$


                Perl 6, 174 bytes





                [X]("diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".comb(3)xx 2)[^364],o*-726436


                Try it online!



                Generate a list of all the valid dates and then indexes the day of the year into that list.






                share|improve this answer











                $endgroup$















                  1












                  1








                  1





                  $begingroup$


                  Perl 6, 174 bytes





                  [X]("diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".comb(3)xx 2)[^364],o*-726436


                  Try it online!



                  Generate a list of all the valid dates and then indexes the day of the year into that list.






                  share|improve this answer











                  $endgroup$




                  Perl 6, 174 bytes





                  [X]("diaviolisgilfuldyumelralzanpalmikfavrujserravtanlinrezjildinketlenlaxnenpinmatkunmir".comb(3)xx 2)[^364],o*-726436


                  Try it online!



                  Generate a list of all the valid dates and then indexes the day of the year into that list.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 13 mins ago

























                  answered 21 mins ago









                  Jo KingJo King

                  28k366134




                  28k366134



























                      draft saved

                      draft discarded
















































                      If this is an answer to a challenge…



                      • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                      • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                        Explanations of your answer make it more interesting to read and are very much encouraged.


                      • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                      More generally…



                      • …Please make sure to answer the question and provide sufficient detail.


                      • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f185339%2foutput-the-date-in-the-mel-calendar%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單