https://github.com/ik5/go_libhdate
Binding of libhdate to go
https://github.com/ik5/go_libhdate
Last synced: about 1 year ago
JSON representation
Binding of libhdate to go
- Host: GitHub
- URL: https://github.com/ik5/go_libhdate
- Owner: ik5
- Created: 2014-10-12T14:03:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-16T09:50:28.000Z (over 11 years ago)
- Last Synced: 2025-02-02T07:14:12.250Z (over 1 year ago)
- Language: Go
- Size: 336 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
hdate
=====
The following Go package is a binding for the C library named libhdate in Go.
In order to use stable version, please use the stable/xxx branches.
The branches of devel/xxx and master are always unstable.
Example
-------
I have provided an example file (At the moment, it does not calculate time
properly).
To install the package:
$ go get github.com/ik5/go_libhdate
A mirror could be found at bitbacket:
$ go get bitbucket.org/ik_5/go_libhdate
Simple usage:
```go
package main
import (
"fmt"
"github.com/ik5/go_libhdate"
)
func main() {
h := hdate.Init()
defer h.Destruct()
// Gregorian date
fmt.Println("Today is:")
fmt.Printf("%d, %d, %d\n", h.Get_GDay(), h.Get_GMonth(), h.Get_GYear())
// print hebrew date: 0 - israely holidays, 0 - long format
fmt.Printf("%s\n\n", h.Get_Format_Date(0, 0))
}
```
License
-------
The following package is provided as LGPL v3. libhdate is GPLi v3.
Copyright (C) 2014 Ido Kanner
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.