<commit_before># PrayTime
PrayTime is a Go based library that calculates Muslim prayer times occurring 5 times a day. The library was ported from <NAME> and <NAME>'s [Java](http://praytimes.org/code/git/?a=viewblob&p=PrayTimes&h=093f77d6cc83b53fb12e9900803d5fa75dacd110&hb=HEAD&f=v1/java/PrayTime.java) implementation. 

Full details as to the overall prayer calculation algorithm are available on the [Praytimes.org](http://praytimes.org/calculation) site.


---
## Prerequisites 
1. Go (v1.7 of above) installed on target workstation.
1. [GOPATH](https://github.com/golang/go/wiki/Setting-GOPATH) environment variable set correctly.
---
## API
The PrayTime Go API is fairly simple to use - the user does not need to understand the underlying calculations to use the library. 

The PrayerLocale struct is defined as follows: 

```go
type PrayerLocale struct {
	latitude, longitude, timezone float64
	PrayerCalcMethod,AsrJuristic,AdjustHighLats,TimeFormat int
}
```

It requires 3 parameters: 
- Latitude - integer value from 90 to -90
- Longitude - integer value from -180 to 180
- Timezone - integer value denoting offset from UTC 

The other parameters are not required and are preset at instantiation including: 

- PrayerCalcMethod - set to praytime.ISNA
- AsrJuristic - set to praytime.SHAFII by default
- AdjustHighLats - set to praytime.NONE by default. 
- TimeFormat - set to praytime.TIME_12 by default. Displays prayer times in the format of hh:mm suffix 

---
## Example 
```go
package main 

import (
     "fmt"
     "time"
     "github.com/buildscientist/prayertime/praytime"
) 

	name,offset := time.Now().Zone()
	offset = offset/3600

	var chicago = praytime.New(41.879626, -87.648217,offset)
	var chicagoPrayerTime = praytime.CalculatePrayerTimes(&chicago, time.Now())

func printPrayerTimes(city string, prayertimes []string) {
 	var today = time.Now()
	fmt.Println()
	fmt.Println("=======" + city + "=======")<commit_msg>Updated example code in README - was previously throwing compilation errors due to unused variable and invalid type being passed to praytime.CalculatePrayerTimes.<commit_after># PrayTime
PrayTime is a Go based library that calculates Muslim prayer times occurring 5 times a day. The library was ported from <NAME> and <NAME>'s [Java](http://praytimes.org/code/git/?a=viewblob&p=PrayTimes&h=093f77d6cc83b53fb12e9900803d5fa75dacd110&hb=HEAD&f=v1/java/PrayTime.java) implementation. 

Full details as to the overall prayer calculation algorithm are available on the [Praytimes.org](http://praytimes.org/calculation) site.


---
## Prerequisites 
1. Go (v1.7 of above) installed on target workstation.
1. [GOPATH](https://github.com/golang/go/wiki/Setting-GOPATH) environment variable set correctly.
---
## API
The PrayTime Go API is fairly simple to use - the user does not need to understand the underlying calculations to use the library. 

The PrayerLocale struct is defined as follows: 

```go
type PrayerLocale struct {
	latitude, longitude, timezone float64
	PrayerCalcMethod,AsrJuristic,AdjustHighLats,TimeFormat int
}
```

It requires 3 parameters: 
- Latitude - integer value from 90 to -90
- Longitude - integer value from -180 to 180
- Timezone - integer value denoting offset from UTC 

The other parameters are not required and are preset at instantiation including: 

- PrayerCalcMethod - set to praytime.ISNA
- AsrJuristic - set to praytime.SHAFII by default
- AdjustHighLats - set to praytime.NONE by default. 
- TimeFormat - set to praytime.TIME_12 by default. Displays prayer times in the format of hh:mm suffix 

---
## Example 
```go
package main 

import (
     "fmt"
     "time"
     "github.com/buildscientist/prayertime/praytime"
) 

	name,offset := time.Now().Zone()
	name = name 
	timezone = float64(offset/3600)

	var chicago = praytime.New(41.879626, -87.648217,timezone)
	var chicagoPrayerTime = praytime.CalculatePrayerTimes(&chicago, time.Now())

func printPrayerTimes(city string, prayertimes []string) {
 	var today = time.Now()
	fmt.Println()
	fmt.Println("=======" + city + "=======")
{'fraction_non_alphanumeric': 0.10108481262327416, 'fraction_numerical': 0.033037475345167655, 'mean_word_length': 4.380636604774536, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1478316', 'n_tokens_mistral': 1402, 'n_tokens_neox': 1259, 'n_words': 420}