Created
October 19, 2015 12:12
-
-
Save jz5/441d1e0dad59da62c2c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
var birthDate = GetBathDate("5zj").Result?.Trim(); | |
Console.WriteLine(birthDate); | |
// birthDate の例: | |
// "誕生日 1990年7月7日" | |
// "誕生日 July 07" | |
// "誕生日 1990" | |
// 英語の場合: | |
// "Born on July 7, 1990" | |
// "Born on July 07" | |
// DateTime 型に変換 | |
DateTime d; | |
if (DateTime.TryParse(birthDate.Replace("誕生日", "").Trim(), out d)) | |
{ | |
Console.WriteLine(d); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment