Skip to main content
added 93 characters in body
Source Link
user42643
user42643

AutoIt - 60 58 56 bytes

$_=@YEAR-2e3
ClipPut(($_-Int($_/4-1))/10+6&' 3'&3*$_-20)

The rounding eats bytes (not anymore). I have now tweaked both formulas. Some sample outputs:

7.3 325 // 2015
7.3 328
7.4 331
7.5 334 // 2018
8.4 370 // 2030

They all seem to be accurate.

A tip: Order of execution saves bytes on parentheses. For example: (a-4)/4 = a/4-1 :-).

AutoIt - 60 58 56 bytes

$_=@YEAR-2e3
ClipPut(($_-Int($_/4-1))/10+6&' 3'&3*$_-20)

The rounding eats bytes (not anymore). I have now tweaked both formulas. Some sample outputs:

7.3 325 // 2015
7.3 328
7.4 331
7.5 334 // 2018
8.4 370 // 2030

They all seem to be accurate.

AutoIt - 60 58 56 bytes

$_=@YEAR-2e3
ClipPut(($_-Int($_/4-1))/10+6&' 3'&3*$_-20)

The rounding eats bytes (not anymore). I have now tweaked both formulas. Some sample outputs:

7.3 325 // 2015
7.3 328
7.4 331
7.5 334 // 2018
8.4 370 // 2030

They all seem to be accurate.

A tip: Order of execution saves bytes on parentheses. For example: (a-4)/4 = a/4-1 :-).

added 8 characters in body
Source Link
user42643
user42643

AutoIt - 60 5858 56 bytes

$_=@YEAR-2e3
ClipPut(($_-Int(($_-4)/4-1))/10+6&' 3'&3*$_-20)

The rounding eats bytes (not anymore). I have now tweaked both formulas. Some sample outputs:

7.3 325 // 2015
7.3 328
7.4 331
7.5 334 // 2018
8.4 370 // 2030

They all seem to be accurate.

AutoIt - 60 58 bytes

$_=@YEAR-2e3
ClipPut(($_-Int(($_-4)/4))/10+6&' 3'&3*$_-20)

The rounding eats bytes (not anymore). I have now tweaked both formulas. Some sample outputs:

7.3 325 // 2015
7.3 328
7.4 331
7.5 334 // 2018
8.4 370 // 2030

They all seem to be accurate.

AutoIt - 60 58 56 bytes

$_=@YEAR-2e3
ClipPut(($_-Int($_/4-1))/10+6&' 3'&3*$_-20)

The rounding eats bytes (not anymore). I have now tweaked both formulas. Some sample outputs:

7.3 325 // 2015
7.3 328
7.4 331
7.5 334 // 2018
8.4 370 // 2030

They all seem to be accurate.

deleted 13 characters in body
Source Link
user42643
user42643

AutoIt - 6060 58 bytes

$_=@YEAR-2e3
ClipPut(($_-RoundInt(($_-64)/4))/10+6&' 3'&3*$_-20)

The rounding eats bytesThe rounding eats bytes (not anymore). I've also simplified the formula for the USI have now tweaked both formulas. Output for this yearSome sample outputs:

7.3 325 // 2015
7.3 328
7.4 331
7.5 334 // 2018
8.4 370 // 2030

They all seem to be accurate.

AutoIt - 60 bytes

$_=@YEAR-2e3
ClipPut(($_-Round(($_-6)/4))/10+6&' 3'&3*$_-20)

The rounding eats bytes. I've also simplified the formula for the US. Output for this year:

7.3 325

AutoIt - 60 58 bytes

$_=@YEAR-2e3
ClipPut(($_-Int(($_-4)/4))/10+6&' 3'&3*$_-20)

The rounding eats bytes (not anymore). I have now tweaked both formulas. Some sample outputs:

7.3 325 // 2015
7.3 328
7.4 331
7.5 334 // 2018
8.4 370 // 2030

They all seem to be accurate.

added 47 characters in body
Source Link
user42643
user42643
Loading
deleted 5 characters in body
Source Link
user42643
user42643
Loading
deleted 1 character in body
Source Link
user42643
user42643
Loading
Source Link
user42643
user42643
Loading