Skip to content

Instantly share code, notes, and snippets.

@alisonmonteiro
Last active January 2, 2025 17:34
Show Gist options
  • Select an option

  • Save alisonmonteiro/c14c76144239441adce1df03bd3457c6 to your computer and use it in GitHub Desktop.

Select an option

Save alisonmonteiro/c14c76144239441adce1df03bd3457c6 to your computer and use it in GitHub Desktop.
get current year
import (
"fmt"
"time"
)
fmt.Println(time.Now().Year())
console.log(new Date().getFullYear())
<?php echo date("Y"); ?>
from datetime import datetime
print(datetime.now().year)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment