Skip to content

Instantly share code, notes, and snippets.

@jz5
Created October 19, 2015 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jz5/441d1e0dad59da62c2c1 to your computer and use it in GitHub Desktop.
Save jz5/441d1e0dad59da62c2c1 to your computer and use it in GitHub Desktop.
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