npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

timedated

v0.0.3

Published

A time/date framework for JavaScript.

Downloads

3

Readme

TimeDated

The JavaScript Time Module.

API Features - v0.0.3

  • Day of the Week Detection

  • Is It The Given Day of The Week?

  • Get Time w/ Date/Sec

  • Get Month

  • Get Year

  • Get Day

  • Get Date

API Testing - v0.0.3

  • getWeekDay(cap). PASSED
  • isWeekDay(is, yes, no). PASSED
  • getTime(date, sec). PASSED
  • getDate(). PASSED
  • getDay(). PASSED
  • getMonth(). PASSED
  • getYear(). PASSED

Changes - v0.0.3

  • Merged DateTime and Time functions.
  • Compressed Repetitive Code.
  • Switched to TypeScript.
  • Now Using Ternarys and Maps for Compression of Code.

How to Use?

timedated.getWeekDay(cap). Cap may have one of many values. Leaving it blank, passing in 'none', 0, or "0", will return the week day in no caps. 'first', 1, or "1", will capitalize the first letter. 'all', 2, or "2", will capitalize all of the letters.

timedated.isWeekDay(is, yes, no). Is is the day of the week. 0-6 are the days of the week starting from Sunday and ending at Saturday. You may put the number in a string or just list the entire day. Ex: timedated.isWeekDay('sunday'). Yes is the return message for when it is that day of the week. Ex: Today is Monday. timedated.isWeekDay('monday', 'true') // returns true. No is the exact same thing as Yes but for when it is false. If no Yes or No is provided, then they will default to true or false boolean values.

timedated.getTime(date, sec). Date and Sec may be either 'true', true, 'false', or false. If no date or sec is provided, they will both default to false. Date determines whether you want to see the date in what it returns. Sec determines whether you want to see the seconds in what it returns.

timedated.getDate(). Returns just the date. Ex: 3/1/2023. timedated.getDay(). Returns just today. Ex: 1 in 3/1/2023. timedated.getMonth(). Returns just the month. Ex: 3 in 3/1/2023. timedated.getYear(). Returns just the year. Ex: 2023 in 3/1/2023.

NONE OF THE ABOVE FUNCTIONS ARE CAP SENSITIVE.

Early Access Project.