Skip to content

Instantly share code, notes, and snippets.

@matifdeveloper
Last active October 12, 2023 10:44
Show Gist options
  • Save matifdeveloper/98d097b7689827d9e0d6def5aa2b9a3d to your computer and use it in GitHub Desktop.
Save matifdeveloper/98d097b7689827d9e0d6def5aa2b9a3d to your computer and use it in GitHub Desktop.
Birthday Calculator
void main() {
String dateString = "19/8/1998"; // Replace with your date string
List<String> dateComponents = dateString.split('/');
if (dateComponents.length == 3) {
int day = int.parse(dateComponents[0]);
int month = int.parse(dateComponents[1]);
print("Day: $day");
print("Month: $month");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment