1.0.8 • Published 1 year ago

ruthbasiccalendar v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Ruth Basic Calendar

This calendar of week

const weekdays=[
    'sunday',
    'monday',
    'tuesday',
    'wednesday',
    'thursday',
    'friday',
    'saturday'
];
function getWeekdayName(index){
    if(index >=0 && index <7){
        return weekdays[index];
    }
    else{
        return 'Invalid index';
    }
}
console.log(getWeekdayName(5));
console.log(getWeekdayName(2));

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

npm install ruth_basiccalculator

Features

1. Error Handling:defining index will help in check user entered correct index of days 2.Readability and maintanability:code is structured well 3.Reusability:The getWeekdayName() function can be reused throughout the program or in other projects to retrieve weekday names based on index

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago