TransWikia.com

Find me a Tinder date!

Code Golf Asked by Dingus on October 27, 2021

Ah, Tinder . . . the app that takes the code golf approach to online dating. With just a few well-chosen right swipes and a bit of luck (or a cute puppy pic), you too could have more matches than /(?!)/.

This challenge involves Tinder dates of a very different kind. Given a Tinder version number as input, hook me up with the date on which that version was released. You may use any convenient formats for input and output (e.g. string, list of integers, date object). Refer to this table*:

+-------------+--------------+
| Version no. | Release date |
+-------------+--------------+
|   11.19.0   |  2020-07-10  |
|   11.18.0   |  2020-06-18  |
|   11.17.0   |  2020-06-04  |
|   11.16.0   |  2020-05-26  |
|   11.15.0   |  2020-05-11  |
|   11.14.0   |  2020-04-27  |
|   11.13.0   |  2020-04-13  |
|   11.12.0   |  2020-03-27  |
|   11.11.1   |  2020-03-21  |
|   11.11.0   |  2020-03-20  |
|   11.10.4   |  2020-03-06  |
|   11.10.3   |  2020-03-02  |
|   11.10.2   |  2020-02-29  |
|   11.10.1   |  2020-02-28  |
|   11.9.0    |  2020-02-13  |
|   11.8.0    |  2020-01-30  |
|   11.7.2    |  2020-01-24  |
|   11.7.1    |  2020-01-20  |
|   11.7.0    |  2020-01-19  |
|   11.6.1    |  2020-01-04  |
|   11.6.0    |  2019-12-16  |
|   11.5.0    |  2019-12-06  |
|   11.4.0    |  2019-11-22  |
|   11.3.0    |  2019-11-10  |
|   11.2.1    |  2019-11-01  |
|   11.1.1    |  2019-10-16  |
|   11.1.0    |  2019-10-11  |
|   11.0.2    |  2019-10-09  |
|   11.0.1    |  2019-09-27  |
|   11.0.0    |  2019-09-20  |
|   10.20.0   |  2019-09-10  |
|   10.19.1   |  2019-09-03  |
|   10.19.0   |  2019-08-28  |
|   10.18.0   |  2019-08-15  |
|   10.17.0   |  2019-07-24  |
|   10.16.0   |  2019-06-24  |
|   10.15.1   |  2019-06-08  |
|   10.15.0   |  2019-06-05  |
|   10.14.0   |  2019-06-04  |
|   10.13.0   |  2019-05-16  |
|   10.12.1   |  2019-05-02  |
|   10.12.0   |  2019-04-28  |
|   10.11.0   |  2019-04-13  |
|   10.10.1   |  2019-04-10  |
|   10.10.0   |  2019-04-02  |
|   10.9.1    |  2019-03-23  |
|   10.9.0    |  2019-03-18  |
|   10.8.1    |  2019-03-15  |
|   10.8.0    |  2019-03-06  |
|   10.7.0    |  2019-02-16  |
|   10.6.0    |  2019-02-12  |
|   10.5.0    |  2019-01-22  |
|   10.4.1    |  2019-01-08  |
|   10.4.0    |  2018-12-17  |
|   10.3.0    |  2018-11-29  |
|   10.2.1    |  2018-11-20  |
|   10.2.0    |  2018-11-15  |
|   10.1.1    |  2018-11-02  |
|   10.1.0    |  2018-10-31  |
|   10.0.2    |  2018-10-25  |
|   10.0.1    |  2018-10-19  |
|   10.0.0    |  2018-10-17  |
|    9.9.2    |  2018-10-12  |
|    9.9.1    |  2018-10-11  |
|    9.9.0    |  2018-10-09  |
|    9.8.1    |  2018-10-03  |
|    9.8.0    |  2018-09-21  |
|    9.7.2    |  2018-09-14  |
|    9.7.1    |  2018-09-06  |
|    9.7.0    |  2018-08-29  |
|    9.6.1    |  2018-08-23  |
|    9.6.0    |  2018-08-21  |
|    9.5.0    |  2018-08-06  |
|    9.4.1    |  2018-08-03  |
|    9.4.0    |  2018-07-24  |
|    9.3.0    |  2018-06-22  |
|    9.2.0    |  2018-06-11  |
|    9.1.0    |  2018-05-29  |
|    9.0.1    |  2018-05-17  |
|    9.0.0    |  2018-05-14  |
|    8.13.0   |  2018-05-03  |
|    8.12.1   |  2018-04-28  |
|    8.12.0   |  2018-04-26  |
|    8.11.0   |  2018-04-12  |
|    8.10.0   |  2018-04-05  |
|    8.9.0    |  2018-03-15  |
|    8.8.0    |  2018-02-28  |
|    8.7.0    |  2018-02-16  |
|    8.6.0    |  2018-02-05  |
|    8.5.0    |  2018-01-22  |
|    8.4.1    |  2018-01-02  |
|    8.4.0    |  2017-12-15  |
|    8.3.1    |  2017-12-08  |
|    8.3.0    |  2017-11-29  |
|    8.2.0    |  2017-11-03  |
|    8.1.0    |  2017-10-17  |
|    8.0.1    |  2017-10-09  |
|    8.0.0    |  2017-09-25  |
|    7.8.1    |  2017-09-08  |
|    7.8.0    |  2017-09-05  |
|    7.7.2    |  2017-08-23  |
|    7.7.1    |  2017-08-15  |
|    7.7.0    |  2017-08-14  |
|    7.6.1    |  2017-07-24  |
|    7.6.0    |  2017-07-14  |
|    7.5.3    |  2017-06-22  |
|    7.5.2    |  2017-06-09  |
|    7.5.1    |  2017-06-02  |
|    7.5.0    |  2017-05-30  |
|    7.4.1    |  2017-05-17  |
|    7.4.0    |  2017-05-09  |
|    7.3.1    |  2017-04-19  |
|    7.3.0    |  2017-04-13  |
|    7.2.2    |  2017-04-03  |
|    7.2.1    |  2017-04-01  |
|    7.2.0    |  2017-03-30  |
|    7.1.1    |  2017-03-16  |
|    7.1.0    |  2017-03-06  |
|    7.0.1    |  2017-02-19  |
|    7.0.0    |  2017-02-16  |
|    6.9.4    |  2017-02-06  |
|    6.9.3    |  2017-01-27  |
|    6.9.2    |  2017-01-25  |
|    6.9.1    |  2017-01-17  |
|    6.9.0    |  2017-01-12  |
|    6.8.1    |  2017-01-03  |
|    6.8.0    |  2016-12-19  |
|    6.7.0    |  2016-11-30  |
|    6.6.1    |  2016-11-18  |
|    6.6.0    |  2016-11-16  |
|    6.5.0    |  2016-11-07  |
|    6.4.1    |  2016-11-01  |
|    6.4.0    |  2016-10-26  |
|    6.3.2    |  2016-10-19  |
|    6.3.1    |  2016-10-12  |
|    6.3.0    |  2016-10-04  |
|    6.2.0    |  2016-09-27  |
|    6.1.0    |  2016-09-20  |
|    5.5.3    |  2016-09-12  |
|    5.5.2    |  2016-09-08  |
|    5.5.1    |  2016-09-03  |
|    5.5.0    |  2016-08-31  |
|    5.4.1    |  2016-08-25  |
|    5.4.0    |  2016-08-18  |
|    5.3.2    |  2016-07-29  |
|    5.3.1    |  2016-07-21  |
|    5.3.0    |  2016-07-19  |
|    5.2.0    |  2016-06-27  |
|    5.1.1    |  2016-06-07  |
|    5.1.0    |  2016-06-06  |
|    5.0.2    |  2016-05-13  |
|    5.0.1    |  2016-04-29  |
|    5.0.0    |  2016-04-21  |
|    4.8.2    |  2016-03-02  |
|    4.8.1    |  2016-01-30  |
|    4.8.0    |  2016-01-27  |
|    4.7.2    |  2015-12-17  |
|    4.7.1    |  2015-11-13  |
|    4.7.0    |  2015-11-11  |
|    4.6.1    |  2015-09-23  |
|    4.6.0    |  2015-09-04  |
|    4.5.0    |  2015-07-07  |
|    4.4.6    |  2015-05-18  |
|    4.4.5    |  2015-05-12  |
|    4.4.4    |  2015-05-05  |
|    4.4.3    |  2015-04-28  |
|    4.4.1    |  2015-04-16  |
|    4.4.0    |  2015-04-15  |
|    4.3.0    |  2015-03-02  |
|    4.1.4    |  2015-02-13  |
|    4.1.3    |  2015-02-06  |
|    4.1.1    |  2015-02-02  |
|    4.0.9    |  2014-10-09  |
|    4.0.8    |  2014-09-27  |
|    4.0.7    |  2014-09-19  |
|    4.0.6    |  2014-09-18  |
|    4.0.4    |  2014-07-17  |
|    4.0.3    |  2014-06-26  |
|    4.0.2    |  2014-06-17  |
|    4.0.1    |  2014-06-06  |
|    4.0.0    |  2014-06-05  |
|    3.0.4    |  2014-03-12  |
|    3.0.3    |  2014-02-26  |
|    3.0.2    |  2013-12-19  |
|    3.0.1    |  2013-11-28  |
|    3.0.0    |  2013-11-21  |
|    2.2.3    |  2013-11-20  |
|    2.2.2    |  2013-09-25  |
|    2.2.1    |  2013-09-24  |
|    2.2.0    |  2013-09-14  |
|    2.1.1    |  2013-06-07  |
|    2.1.0    |  2013-05-23  |
|    2.0.3    |  2013-04-01  |
|    2.0.2    |  2013-03-29  |
|    2.0.1    |  2013-03-28  |
|    1.1.4    |  2013-02-08  |
|    1.1.3    |  2013-02-06  |
|    1.1.2    |  2013-01-21  |
|    1.1.1    |  2013-01-11  |
|    1.1.0    |  2013-01-08  |
|    1.0.6    |  2012-11-24  |
|    1.0.5    |  2012-11-16  |
|    1.0.4    |  2012-11-06  |
|    1.0.3    |  2012-09-20  |
|    1.0.2    |  2012-08-29  |
|    1.0.1    |  2012-08-15  |
|    1.0.0    |  2012-08-03  |
+-------------+--------------+

*Source, with four modifications to unify the version number format (1.03 → 1.0.3, 4.3 → 4.3.0, 4.4 → 4.4.0, iOS 8.4.0 → 8.4.0).

5 Answers

Jelly, 333 332 bytes

“3ĖẎ⁺Ḣµ3bṄ9HĊ:%:ḞŻHuƤƊ²ⱮĠJėḷȧ!°ọṫọẠIÆGƙĿĠR%ėȦqȷSḂṘ^ṡ¬’BC2“®(0>FZ`j‘¦3“"4‘¦s2;"“€żḍḋF=ẎhƘẎƁy7ẉr¶$qɦṁI>Ḥ⁾s÷,Ṇ~ʋƊt¦c@ɓḥḤ~ÐqHṀ °8{yþẒ⁺¬4ɠz DOṇĠƓK?Ọj!⁽>3'nẏmẹœƭUÑʠæƥæk¹Ð§©ḲŒmPɦġRXɓµọạṢṘỤzḍ⁻s¡+翹ḋ-^ɼRċIsẸƑñ*½Nı’b29¤[“¬¿“¬“£’];
“eÄneøỌC<½weƙBƤʠĠċUṅKȮCıẈ-ɱ¥*øṬḊ⁹®gṫ¥ɗɱɦɦN⁶ÐẈGṖƭƇ¶ȦĿ⁸ịỵ9ḟŒḥɱ=ṭcỴʠßɓḷ@ḳⱮsṪɠḞ.ṣ?9’B2“`ot~‘¦s3,¢¹×TṂ>3Ḷ¤Ʋ}+ʋ€yW

Try it online!

Input and output are a list of three integers. (The output is actually wrapped in a singleton list, but that's not visible.)

Explanation

The version numbers are stored as increments from the last version, except if the minor version is increased, then the patch version is automatically reset, etc. For example: [7,8,9] + [0,1,2] = [7,9,2]. It turns out that most increments are made of 0's and 1's, so I concatenated them (starting with the initial version [1,0,0], replaced 2's with 0's and represented the huge binary number with a base-250 literal, then added code to set the specific indices to 2.

For dates, the same incrementing logic is used, but this time the day increments are much bigger (up to 28), so I stored them separately as a base 29 number. (Since there are no 0's, I tried using base 28 and incrementing, but it wasn't worth it.) Years and months are stored analogously to version numbers, except:

  • The initial date is added separately
  • The number had leading zeros, so I had to invert it
  • There were some 3's, which I dealt with the same way as with 2's.

Merging this all together creates the table, which I simply pass to the y (translate) command to look up the input.

Answered by xigoi on October 27, 2021

PowerShell, 513 508 bytes

Inspired by Arnauld's answer. It's nice code.

param($t)$v=,0*5;$d='2012-8'|date
'Ba2a4b2d7a0hT5ca0a6b@d8acU2a5Y9a0ae6Agb1f9a4H5aa1ib1`f3aha2Pa16`dgPQ7T4a`a2ggfU0U9a9T9bc4T1cc2E0ha4R4aR0R2bhR0gVced@XWWhgWfVYbQ2Q9a5Yehba0A0cQ5a0Q4bbQ0fR0hQ3cga3R2a0R1ahQ3cA7a4XQ7R6iWa8R0Q4Q1Q2Q5R1WQ4bUA1cQ2Q3Q1S2a0SQ5bVhhWa2VbaEbfVbQ3eYQ8b2Q4R1TQ8iSeQ0hSQ5dQ4Q9QcQ6S0R2Q3fWA0ga2RePa6YQ2Q4Q0a9Q5adVQ4Pa5abdQ4aVQ7Q4Q4Q5YQ4R2'-split'(?=D)'|%{$d=$d|% *ys($a=[char]($_[0]-($i=($_[0]-48)-shr4)*16)+$_[1]+$_[2])
$v[$i-1]++;$v[$i]=$v[$i+1]=0;if(+$a-and$v[0..2]-join'.'-eq$t){$d}}

Try it online!

Some versions of the Tinder are missing from the list. They're added as test cases.

The script starts with version 0.0.0 and the date of August 1, 2012.

Then the script iterates through the data string. Each substring contains the number of days since the previous release and the descriptor in the first character ASCII code. The descriptor is one of 16,32,48:

  • 16 - increment the major version by 1
  • 32 - increment the middle version by 1
  • 48 - increment the minor version by 1

The script excludes versions for which the number of days is zero, but makes an increment for the version. Thus, the script works correctly with the missed versions of the Tinder.

Answered by mazzy on October 27, 2021

Python 3.8, 519 517 493 bytes

lambda x,e=enumerate:((y:=sum(ord(i)-35for i in"/1:U-+Ó&-4%W#$'Y3x8a-$^$*:ê5|$.,:#d$+1Ĝ##'*8#P$#/,*)X`6W%GÍ&GV+3<$7;%+8*)'('+#*,+***),%/8³,(+%.-&6-1&%-)9+0'*0;-9$+1&43+5=.*¶72./69*1%*.&/1.E.&2%),+*1)%$(%))&0(,7º19'9,&(.+&2)17$&3C:0**-*1%(4#,/3-·2$')22#$('1$)5132-1;#"[:[(n,m,k)for n,i in e('1p 7o 5 6fp23 2aqc 2jno0l mzkii f1qqnj2p 4r96mr srha04m2ix5d 3lfbiojllc95'.split(),1)for m,j in e('a'*(n==4)+oct(int(i,36))[2:])for k in range(int(j,16))].index(x)])+1030403)>>9,(y>>5)&15,y&31)

Try it online!

Compressor+ungolfed:

import re
import time
import calendar
import base64
import math
with open('207234.txt','rt') as f:
    s=f.read()
matcher=re.compile(
    re.sub(r'd+',lambda m:r'(d+)',
    re.sub(r'(?:\ )+',lambda m:r's*',
    re.escape((x:=s.split('n'))[0])
           )
           )
    )
assert len(x_:=matcher.findall(s))==sum(1 for i in x if i)
x_=[[int(j) for j in i] for i in x_][::-1]
v_=[tuple(i[:3]) for i in x_]
#for v in [(2, 0, 1),(11, 2, 1)][::-1]:
#    i=v_.index(v)
#    a,b,c,d,e,f=x_[i]
#    x_=x_[:i]+[[a,b,c-1,d,e,f]]+x_[i:]
for n,v in (v_add:=[(1,(2, 0, 1)),
            (0,(4, 0, 4)),
            (1,(4, 1, 1)),
            (0,(4, 1, 1)),
            (2,(4, 3, 0)),
            (0,(4, 4, 1)),
            (2,(6, 1, 0)),
            (1,(11, 2, 1)),
            (1,(11, 10, 1))])[::-1]:
    i=v_.index(v)
    a,b,c,d,e,f=x_[i]
    plus_i,plus_c,plus_b=[(1,1,0),(0,-1,0),(0,0,-1)][n]
    x_=x_[:i+plus_i]+[[a,b+plus_b,c+plus_c,d,e,f]]+x_[i+plus_i:]
x=[[0]]
old_a,old_b,old_c=1,0,0
for a,b,c,d,e,f in x_:
    if old_c!=c:
        if old_a==a and old_b==b:
            assert c==old_c+1# or (old_a,old_b,old_c) in [
                #(4, 0, 4),(4, 1, 1),(4, 4, 1)]
        x[-1][-1]+=(c-old_c>=0 and c-old_c or 1)
    if old_b!=b:
        if old_c==c:
            assert c==0# or (a,b,c) in [(11, 2, 1)]
            x[-1][-1]=1
        x[-1].append(0)
    if old_a!=a:
        if old_b==b:
            x[-1].append(0)
        x.append([0])
    old_a,old_b,old_c=a,b,c
x[-1][-1]+=1
v__=[(n,m,k) for n,i in enumerate(x,1)
     for m,j in enumerate(i)
     for k in range(j)]
assert set(v_)-set(v__)==set()
assert len(set(v__)-set(v_))==len(v_add)
versions=x
x=[d*512+e*32+f
    for a,b,c,d,e,f in x_
    ]
x2=[i-j for i,j in zip(x[1:],x)]
ls2,d2,s2=min((len(repr(
        s:=''.join(chr(k+l) for k in x2+[0])
        ).encode('utf-8')),l,s) for l in range(32,128))
print(ls2,d2)
s0=''.join(''.join(((str(j) if j else ' ') if j0 and base_n(x//n,n)+chr(48+x%n+(97-48-10)*(x%n>=10)) or ''
s0_=' '.join(base_n(int(i,8),36) for i in s0.split())
assert (s0==
    ' '.join(
        #('a'*(n==4)+
        oct(int(i,36))[2:]
        #)
        for n,i in enumerate(s0_.split(),1))
        )
print(len(s0_))
f=(
#print(len(r'''
lambda x,e=enumerate:((
    y:=sum(ord(i)-35 for i in s2[
        :[(n,m,k)
          for n,i in e(s0_.split(),1)
          for m,j in e('a'*(n==4)+oct(int(i,36))[2:])
          for k in range(int(j,16))].index(x)
        ])+1030403
    )>>9,(y>>5)&15,y&31)
#''')-8-4*(7+5)-3)
)
assert all(f((a,b,c))==(d,e,f_) for a,b,c,d,e,f_ in x_)

Answered by Alexey Burdin on October 27, 2021

JavaScript (Node.js),  527 ... 498  493 bytes

Expects the version in the format described in the challenge. Returns a stringified Date object.

v=>"W302o288qB$87LB38R8gXL7x3egzBX9wW*2ec62od1X<H2eX8wX$30iiXL*Y398dXX<**Z7dab1u7jR6g67L447b$2o4lX2l29R$2l*[L`1o!++$*+Z[IR311v3eI`$RBAL3fB2pRRCZ2l$2vL*2u29B2fX$2vL252o%2755H+202l2p=313f2f+2pR1j;L312v=45BM3fR[$$+30[RX_RZ[R2v`I21282p2f1p21HM`C$M3f1o2p1vYL393l292vZ+A*30S`36I312pC1u3fX1o[2p3cXR1o2pX[272p2p3fI2p29".replace(/[da-z]?./g,s=>(n=(s[1]?parseInt(s,36):Buffer(s)[0]-32-10*(s>'9'))^46,d-=~(n/6),n%=6,y=++n&4?z=++x-x:y,z=(n&2?!++y:z)+n%2,v==x+`.${y}.`+z?new Date(d*864e5):''),x=0,d=15554)

Try it online!

How?

Each version is stored as a number $d$ of days elapsed since the previous version and a 3-bit value $m$ describing how the version numbers x.y.z are updated. The final value is:

$$n=big(6times(d-1)+(m-1)big)operatorname{XOR}46$$

The purpose of the XOR is to maximize the number of small values.

Numbers $0$ to $15$ are encoded with a single character in the ASCII range 32-47.

Numbers $16$ to $54$ are encoded with a single character in the ASCII range 58-96.

All other numbers are encoded as a 2-digit number in base 36, using digits and lower case letters (ASCII ranges 48-57 and 97-122 respectively).

We use the regular expression /[da-z]?./g to match either a 2-digit number in base-36 or a single character in the other ASCII ranges.

Answered by Arnauld on October 27, 2021

Javascript - 862 bytes

r=(v=>{for(p=[1,0,0],s=0,d="0cc0ec16c2fc0ac08c2db03c0ac10c02c30a00c01c03c34b0fc63b0ac01c38c01a07c15c45c0ec55a01c0bc09c15c3fc00c01c08c0cc74b00c04c00c07c11b00b2cb01c0cc00c07c07c06c32b3bb13c31b02c22c29b03c20c32a08c0ec18b01c14b16b02c08c14b07c06b03c05c04c08a00b07b07b08c07c07b06c06b09b02c0cb13b0fc09b05c08c02c0ac0aa03c0fb0ac0eb02c02c0ab06c14b08c0db03c07c0dc16b0ac15b01c08c0db03c11a0ec08b11b1ab09c07b12c14b0eb0bb0cb0fb15b07b0eb02c05b0ba03c0cb0db0bb20b0ac03b0fb02c06b08c08c07b0cc06b02c01c05a02c06c06b02c0db05c09b12b16c0eb15b04b12b09c03b05c0ab08c03b0fb04c0eb13b01b03c10b1eb16b0db06c07b0aa07c0cc02b05c10b00c09b0cb0eb0ab13c0fb01c04c06b0eb0fb00c01c02c04c0eb01c06b11b0eb0eb0fb09b0eb16b00c",i=0;;i+=3){if(p.join(".")==v)return new Date(1343952e6+864e5*s).toISOString().substr(0,10);s+=parseInt(d[i]+d[i+1],16),l=d[i+2],[a,b,c]=p,p='b'>l?[a+1,0,0]:'c'>l?[a,b+1,0]:[a,b,c+1]}})

Explanation

The release dates are encoded as a difference of days. Each diff is represented by 3 characters in d. The first 2 characters indicate the number of days to the next version. The last character uses 'a','b', or 'c' to represent which part of the version changed, if the version number is considered as a.b.c .

As some versions skip over numbers (such as 11.1.1 to 11.2.1), missing releases were added, costing only 3 bytes each.

There's probably some additional compression possible with the data string but I wanted to keep it strictly ASCII.

const version_dates = {
    '11.19.0':'2020-07-10',
    '11.18.0':'2020-06-18',
    '11.17.0':'2020-06-04',
    '11.16.0':'2020-05-26',
    '11.15.0':'2020-05-11',
    '11.14.0':'2020-04-27',
    '11.13.0':'2020-04-13',
    '11.12.0':'2020-03-27',
    '11.11.1':'2020-03-21',
    '11.11.0':'2020-03-20',
    '11.10.4':'2020-03-06',
    '11.10.3':'2020-03-02',
    '11.10.2':'2020-02-29',
    '11.10.1':'2020-02-28',
    '11.10.0':'2020-02-28',
    '11.9.0':'2020-02-13',
    '11.8.0':'2020-01-30',
    '11.7.2':'2020-01-24',
    '11.7.1':'2020-01-20',
    '11.7.0':'2020-01-19',
    '11.6.1':'2020-01-04',
    '11.6.0':'2019-12-16',
    '11.5.0':'2019-12-06',
    '11.4.0':'2019-11-22',
    '11.3.0':'2019-11-10',
    '11.2.1':'2019-11-01',
    '11.2.0':'2019-11-01',
    '11.1.1':'2019-10-16',
    '11.1.0':'2019-10-11',
    '11.0.2':'2019-10-09',
    '11.0.1':'2019-09-27',
    '11.0.0':'2019-09-20',
    '10.20.0':'2019-09-10',
    '10.19.1':'2019-09-03',
    '10.19.0':'2019-08-28',
    '10.18.0':'2019-08-15',
    '10.17.0':'2019-07-24',
    '10.16.0':'2019-06-24',
    '10.15.1':'2019-06-08',
    '10.15.0':'2019-06-05',
    '10.14.0':'2019-06-04',
    '10.13.0':'2019-05-16',
    '10.12.1':'2019-05-02',
    '10.12.0':'2019-04-28',
    '10.11.0':'2019-04-13',
    '10.10.1':'2019-04-10',
    '10.10.0':'2019-04-02',
    '10.9.1':'2019-03-23',
    '10.9.0':'2019-03-18',
    '10.8.1':'2019-03-15',
    '10.8.0':'2019-03-06',
    '10.7.0':'2019-02-16',
    '10.6.0':'2019-02-12',
    '10.5.0':'2019-01-22',
    '10.4.1':'2019-01-08',
    '10.4.0':'2018-12-17',
    '10.3.0':'2018-11-29',
    '10.2.1':'2018-11-20',
    '10.2.0':'2018-11-15',
    '10.1.1':'2018-11-02',
    '10.1.0':'2018-10-31',
    '10.0.2':'2018-10-25',
    '10.0.1':'2018-10-19',
    '10.0.0':'2018-10-17',
    '9.9.2':'2018-10-12',
    '9.9.1':'2018-10-11',
    '9.9.0':'2018-10-09',
    '9.8.1':'2018-10-03',
    '9.8.0':'2018-09-21',
    '9.7.2':'2018-09-14',
    '9.7.1':'2018-09-06',
    '9.7.0':'2018-08-29',
    '9.6.1':'2018-08-23',
    '9.6.0':'2018-08-21',
    '9.5.0':'2018-08-06',
    '9.4.1':'2018-08-03',
    '9.4.0':'2018-07-24',
    '9.3.0':'2018-06-22',
    '9.2.0':'2018-06-11',
    '9.1.0':'2018-05-29',
    '9.0.1':'2018-05-17',
    '9.0.0':'2018-05-14',
    '8.13.0':'2018-05-03',
    '8.12.1':'2018-04-28',
    '8.12.0':'2018-04-26',
    '8.11.0':'2018-04-12',
    '8.10.0':'2018-04-05',
    '8.9.0':'2018-03-15',
    '8.8.0':'2018-02-28',
    '8.7.0':'2018-02-16',
    '8.6.0':'2018-02-05',
    '8.5.0':'2018-01-22',
    '8.4.1':'2018-01-02',
    '8.4.0':'2017-12-15',
    '8.3.1':'2017-12-08',
    '8.3.0':'2017-11-29',
    '8.2.0':'2017-11-03',
    '8.1.0':'2017-10-17',
    '8.0.1':'2017-10-09',
    '8.0.0':'2017-09-25',
    '7.8.1':'2017-09-08',
    '7.8.0':'2017-09-05',
    '7.7.2':'2017-08-23',
    '7.7.1':'2017-08-15',
    '7.7.0':'2017-08-14',
    '7.6.1':'2017-07-24',
    '7.6.0':'2017-07-14',
    '7.5.3':'2017-06-22',
    '7.5.2':'2017-06-09',
    '7.5.1':'2017-06-02',
    '7.5.0':'2017-05-30',
    '7.4.1':'2017-05-17',
    '7.4.0':'2017-05-09',
    '7.3.1':'2017-04-19',
    '7.3.0':'2017-04-13',
    '7.2.2':'2017-04-03',
    '7.2.1':'2017-04-01',
    '7.2.0':'2017-03-30',
    '7.1.1':'2017-03-16',
    '7.1.0':'2017-03-06',
    '7.0.1':'2017-02-19',
    '7.0.0':'2017-02-16',
    '6.9.4':'2017-02-06',
    '6.9.3':'2017-01-27',
    '6.9.2':'2017-01-25',
    '6.9.1':'2017-01-17',
    '6.9.0':'2017-01-12',
    '6.8.1':'2017-01-03',
    '6.8.0':'2016-12-19',
    '6.7.0':'2016-11-30',
    '6.6.1':'2016-11-18',
    '6.6.0':'2016-11-16',
    '6.5.0':'2016-11-07',
    '6.4.1':'2016-11-01',
    '6.4.0':'2016-10-26',
    '6.3.2':'2016-10-19',
    '6.3.1':'2016-10-12',
    '6.3.0':'2016-10-04',
    '6.2.0':'2016-09-27',
    '6.1.0':'2016-09-20',
    '6.0.0':'2016-09-20',
    '5.5.3':'2016-09-12',
    '5.5.2':'2016-09-08',
    '5.5.1':'2016-09-03',
    '5.5.0':'2016-08-31',
    '5.4.1':'2016-08-25',
    '5.4.0':'2016-08-18',
    '5.3.2':'2016-07-29',
    '5.3.1':'2016-07-21',
    '5.3.0':'2016-07-19',
    '5.2.0':'2016-06-27',
    '5.1.1':'2016-06-07',
    '5.1.0':'2016-06-06',
    '5.0.2':'2016-05-13',
    '5.0.1':'2016-04-29',
    '5.0.0':'2016-04-21',
    '4.8.2':'2016-03-02',
    '4.8.1':'2016-01-30',
    '4.8.0':'2016-01-27',
    '4.7.2':'2015-12-17',
    '4.7.1':'2015-11-13',
    '4.7.0':'2015-11-11',
    '4.6.1':'2015-09-23',
    '4.6.0':'2015-09-04',
    '4.5.0':'2015-07-07',
    '4.4.6':'2015-05-18',
    '4.4.5':'2015-05-12',
    '4.4.4':'2015-05-05',
    '4.4.3':'2015-04-28',
    '4.4.2':'2015-04-28',
    '4.4.1':'2015-04-16',
    '4.4.0':'2015-04-15',
    '4.3.0':'2015-03-02',
    '4.2.0':'2015-03-02',
    '4.1.4':'2015-02-13',
    '4.1.3':'2015-02-06',
    '4.1.2':'2015-02-06',
    '4.1.1':'2015-02-02',
    '4.1.0':'2015-02-02',
    '4.0.9':'2014-10-09',
    '4.0.8':'2014-09-27',
    '4.0.7':'2014-09-19',
    '4.0.6':'2014-09-18',
    '4.0.5':'2014-09-18',
    '4.0.4':'2014-07-17',
    '4.0.3':'2014-06-26',
    '4.0.2':'2014-06-17',
    '4.0.1':'2014-06-06',
    '4.0.0':'2014-06-05',
    '3.0.4':'2014-03-12',
    '3.0.3':'2014-02-26',
    '3.0.2':'2013-12-19',
    '3.0.1':'2013-11-28',
    '3.0.0':'2013-11-21',
    '2.2.3':'2013-11-20',
    '2.2.2':'2013-09-25',
    '2.2.1':'2013-09-24',
    '2.2.0':'2013-09-14',
    '2.1.1':'2013-06-07',
    '2.1.0':'2013-05-23',
    '2.0.3':'2013-04-01',
    '2.0.2':'2013-03-29',
    '2.0.1':'2013-03-28',
    '2.0.0':'2013-03-28',
    '1.1.4':'2013-02-08',
    '1.1.3':'2013-02-06',
    '1.1.2':'2013-01-21',
    '1.1.1':'2013-01-11',
    '1.1.0':'2013-01-08',
    '1.0.6':'2012-11-24',
    '1.0.5':'2012-11-16',
    '1.0.4':'2012-11-06',
    '1.0.3':'2012-09-20',
    '1.0.2':'2012-08-29',
    '1.0.1':'2012-08-15',
    '1.0.0':'2012-08-03'
}

r=(v=>{for(p=[1,0,0],s=0,d="0cc0ec16c2fc0ac08c2db03c0ac10c02c30a00c01c03c34b0fc63b0ac01c38c01a07c15c45c0ec55a01c0bc09c15c3fc00c01c08c0cc74b00c04c00c07c11b00b2cb01c0cc00c07c07c06c32b3bb13c31b02c22c29b03c20c32a08c0ec18b01c14b16b02c08c14b07c06b03c05c04c08a00b07b07b08c07c07b06c06b09b02c0cb13b0fc09b05c08c02c0ac0aa03c0fb0ac0eb02c02c0ab06c14b08c0db03c07c0dc16b0ac15b01c08c0db03c11a0ec08b11b1ab09c07b12c14b0eb0bb0cb0fb15b07b0eb02c05b0ba03c0cb0db0bb20b0ac03b0fb02c06b08c08c07b0cc06b02c01c05a02c06c06b02c0db05c09b12b16c0eb15b04b12b09c03b05c0ab08c03b0fb04c0eb13b01b03c10b1eb16b0db06c07b0aa07c0cc02b05c10b00c09b0cb0eb0ab13c0fb01c04c06b0eb0fb00c01c02c04c0eb01c06b11b0eb0eb0fb09b0eb16b00c",i=0;;i+=3){if(p.join(".")==v)return new Date(1343952e6+864e5*s).toISOString().substr(0,10);s+=parseInt(d[i]+d[i+1],16),l=d[i+2],[a,b,c]=p,p='b'>l?[a+1,0,0]:'c'>l?[a,b+1,0]:[a,b,c+1]}})

const test_passed = Object.keys(version_dates).every(version=>
    version_dates[version]===r(version)
);
console.log(test_passed ? 'TEST PASSED' : 'TEST_FAILED')

Answered by Ted Brownlow on October 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP