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

hebrewcalendar

v1.0.6

Published

this is a reactJs video component which a hebrew calendar

Downloads

15

Readme

Getting Started with the React Hebrew Calendar component

This component is a simple calendar which displays the gergorian calendar and the hebrew calendar. This component also shows the following:

  1. Parashot Hashvua.
  2. Jewish Events

In order to install this component simply execute the following command:

npm i hebrewcalendar

Here is how you implement the component in your react code

import './App.css';
import Cal from 'hebrewcalendar/Cal';
import { DayObj } from 'hebrewcalendar/HebrewCalendar/interfaces/dayObj';
import { Language } from 'hebrewcalendar/HebrewCalendar/enums/language'; 

function App() {
  const selectDateHandler = (selectedDate) => {
    console.log('selectDateHandler', selectedDate);
  }

  return (
    <div className="App">
      <div className="celendarContainer"><Cal onSelectDate={(selectedDate) => selectDateHandler(selectedDate)} language={Language.Hebrew}></Cal></div>
    </div>
  );
}

export default App;

This new component has the following attributes:

  1. onSelectDate - This is a mandatory attributes which is activated every time the user chooses a specific date. Its argument is a DayObj interface which looks like this:
export interface DayObj {
    internationalDate: number;
    HebrewDate: HDate;
    DayOfWeek: number;
    ButtonDate: Date;
    ParashaShavua?: string;
    EventObj?: Array<Event>;
}
  • internationalDate - Day of the gregorian month
  • HebrewDate - An HDate object which describes the Hebrew date object which consists of the Hebrew month, Hebrew year, and Hebrew day. more details about the HDate object can be found at: https://github.com/hebcal/hebcal-es6#hdate
  • DayOfWeek - Day of the week where Sunday is 0 and Saturday is 6.
  • ButtonDate - Gregorian javascript date object.
  • ParashaShavua - weekly "Parashat Hashvua" in a string object.
  • EventObj - Special event object in the Jewish year. More details can be found at: https://github.com/hebcal/hebcal-es6#Event
  1. selectedDate - optional, This attribute specifies a selected date of the Hebrew calendar component. if omitted then the current date is selected.
  2. language - optional, language of the component.
export enum Language {
    Hebrew = 'he',
    English = 'en'
}
  1. format - optional, general format of the component, large or small

The following attributes all all CSS customizing attributes and are React CSSProperties objects.

  1. customCalWrapper - optional, CSS of the whole component
  2. customControllers - optional, CSS of the top component
  3. customInputText - optional, CSS of the input text which represents the year
  4. customSelect - optional, CSS of the select month component
  5. customSelectOption - optional, CSS of the select month options component
  6. customHebTitle - optional, CSS of the custom Hebrew title
  7. customTable - optional, CSS of the custom table
  8. customTr - optional, CSS of the custom header row
  9. customDataTr - optional, CSS of the custom data row
  10. customTd - optional, CSS of the custom data cell
  11. customTh - optional, CSS of the custom header cell
  12. customSpecialEvent - optional, CSS of the custom special event cell
  13. customSaturday - optional, CSS of the custom Saturday cell
  14. customSelectedDate - optional, CSS of the custom selected date cell
  15. customButtonDateWrapper - optional, CSS of the custom td inner content
  16. customDate - optional, CSS of the custom day in month component
  17. customHebDate - optional, CSS of the custom Hebrew day
  18. customGregDate - optional, CSS of the custom Gregorian day
  19. customDesc - optional, CSS of the custom description

If omitted then the default language is English.

Final words

This component is based on the hebcal-es6 javascript library and has its GPL-2.0 license.

A working sample of this component can be seen here.

This component was made by Kobi Krasnoff.