Skip to main content

Timeline for Convert YYYYMM to MMMYY

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Apr 8, 2018 at 13:49 comment added l4m2 main(m){char a[9];scanf("%4s%d",a,&m);printf("%.3s%s","JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"+--m*3,a+2);} lot shorter
Apr 13, 2017 at 12:39 history edited CommunityBot
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Jun 23, 2016 at 16:00 comment added Marco Thanks @ugoren! I also changed "%4s%2d" to "%4s%d".
Jun 23, 2016 at 15:56 history edited Marco CC BY-SA 3.0
added 57 characters in body
Jun 23, 2016 at 15:09 comment added ugoren Also, the %.3s format saves the null termination.
Jun 23, 2016 at 15:07 comment added ugoren Some cheap tricks - delete the #include, define m as a parameter - main(m),
Jun 23, 2016 at 11:43 history edited Marco CC BY-SA 3.0
a[m*3]=0 and a+(m-1)*3 to a[m--*3]=0 and a+m*3
Jun 23, 2016 at 2:47 review Low quality posts
Jun 23, 2016 at 3:51
Jun 23, 2016 at 2:28 history answered Marco CC BY-SA 3.0