Skip to content

This is Library's for Prayer times using Latitude, Longitude, and Timezone (e.g UTC +7 and etc..)

Notifications You must be signed in to change notification settings

pandudpn/prayer-times

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This library for any applications who needs a Prayer Times. using Latitude, Longitude, and Timezone (e.g UTC +7 and etc..) The data will be appearing in 1 month.

Installation

Step 1

   # if you want using Https
   git clone https://github.com/pandudpn/prayer-times.git
   
   # or if you want using SSH
   git clone [email protected]:pandudpn/prayer-times.git

Step 2

   npm -i --save

How to Use

This is example to shown in 1 day.

   const prayer = require("../libs/prayer")
   
   module.exports.prayer  = (req, res) => {
      // if u are using header
      const lat       = req.header("lat")
      const long      = req.header("long")
      const timezone  = req.header("timezone")
      const method    = req.header("method")
      
      // query
      const { date }  = req.query
      
      const prayTimes = new prayer.times(method)
      
      let dates       = new Date()
      
      if(dates != undefined) {
        dates = new Date(date)
      }
      
      const times     = prayTimes.getTimes(dates, [lat, long], timezone)
      
      res.status(200).send(times)
   }

About

This is Library's for Prayer times using Latitude, Longitude, and Timezone (e.g UTC +7 and etc..)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published