Skip to content

Instantly share code, notes, and snippets.

@jz5
Created Oct 19, 2015
Embed
What would you like to do?
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