golang time comparision

package main

import (
    "fmt"
    "time"
)

func main() {
    // Current time
    now := time.Now()

    // Create a specific time
    specificTime := time.Date(2023, time.December, 5, 12, 30, 0, 0, time.UTC)

    // Compare if now is before specificTime
    isBefore := now.Before(specificTime)
    fmt.Printf("Is now before specific time? %t\n", isBefore)

    // Compare if now is after specificTime
    isAfter := now.After(specificTime)
    fmt.Printf("Is now after specific time? %t\n", isAfter)

    // Check if two times are equal
    isEqual := now.Equal(specificTime)
    fmt.Printf("Is now equal to specific time? %t\n", isEqual)
}