Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 4 characters in body
Source Link

PHP, (削除) 46 (削除ここまで), 43(削除) 43 (削除ここまで), 31 bytes

function f($s){echo date<?=date(d,strtotime($s$argv[1]));}

Try it online! Try it online!

The functionprogram receives as input a string like "second saturday of March 2019"

The function returnsprogram prints the day number.

-12 bytes thanks to Shaggy.

PHP, (削除) 46 (削除ここまで), 43 bytes

function f($s){echo date(d,strtotime($s));}

Try it online!

The function receives as input a string like "second saturday of March 2019"

The function returns the day number.

PHP, (削除) 46 (削除ここまで), (削除) 43 (削除ここまで), 31 bytes

<?=date(d,strtotime($argv[1]));

Try it online!

The program receives as input a string like "second saturday of March 2019"

The program prints the day number.

-12 bytes thanks to Shaggy.

added 3 characters in body
Source Link

PHP, 46(削除) 46 (削除ここまで), 43 bytes

function f($s){returnecho date(d,strtotime($s));};

Try it online! Try it online!

The function receives as input a string like "second saturday of March 2019"

The function returns the day number.

PHP, 46 bytes

function f($s){return date(d,strtotime($s));};

Try it online!

The function receives as input a string like "second saturday of March 2019"

The function returns the day number.

PHP, (削除) 46 (削除ここまで), 43 bytes

function f($s){echo date(d,strtotime($s));}

Try it online!

The function receives as input a string like "second saturday of March 2019"

The function returns the day number.

deleted 7 characters in body
Source Link

PHP, 46 bytes

function f($s){return date(d,strtotime($s));};

Try it online!

The function receives as input a string like "second saturday of March 2019"

The function returns the day number.

PHP, 46 bytes

function f($s){return date(d,strtotime($s));};

Try it online!

The function receives as input a string like "second saturday of March 2019"

PHP, 46 bytes

function f($s){return date(d,strtotime($s));};

Try it online!

The function receives as input a string like "second saturday of March 2019"

The function returns the day number.

deleted 7 characters in body
Source Link
Loading
Source Link
Loading

AltStyle によって変換されたページ (->オリジナル) /