You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.7 KiB

// ------------------------------------------------------------------------
// Project atila
// Active Thing (activething.com) git.activething.com/go
//
// File name main.go
// Created by DEV
// Modified 16/01/2024
//
// Copyright 2024 activething.com
// ------------------------------------------------------------------------
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ------------------------------------------------------------------------
package main
import (
"activething.com/go/gogo/core/times"
"activething.com/go/gogo/core/times/bdates"
"fmt"
)
func main() {
fmt.Printf("1970 %d \n",times.DayOfWeek(1970,1,1))
fmt.Printf("2020 %d \n",times.DayOfWeek(2020,1,1))
fmt.Printf("2021 %d \n",times.DayOfWeek(2021,1,1))
fmt.Printf("2022 %d \n",times.DayOfWeek(2022,1,1))
fmt.Printf("2023 %d \n",times.DayOfWeek(2023,1,1))
fmt.Printf("2024 %d \n",times.DayOfWeek(2024,1,1))
a := bdates.BYearAtt(bdates.BYearAttLeap)
n := a.SetStartDay(6)
fmt.Printf(" %d = %b \n ",n.StartDay(),n)
n = a.SetStartDay(3)
fmt.Printf(" %d = %b \n ",n.StartDay(),n)
for i:=2020; i<=2024; i++ {
y := bdates.MakeBYear(i)
fmt.Printf("%d Bisiesto %s - dia de la semana %b \n",i,y.Atts().IsLeap(),y.Atts().StartDay())
}
}

Powered by TurnKey Linux.