GithubHelp home page GithubHelp logo

clydedz / horoscope-nuget Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 361 KB

A .NET library for Zodiac signs. Get details on each Zodiac sign, pass a date and know which Zodiac sign it falls in or get a list of all Zodiac signs.

Home Page: https://www.nuget.org/packages/Horoscope/

License: MIT License

C# 100.00%
nuget zodiac zodiac-sign horoscope clyde-dsouza csharp dotnet dotnet-standard class-library xunit

horoscope-nuget's Introduction

Horoscope NuGet

A .NET library for zodiac signs. Get details on each zodiac sign, pass a date and know which zodiac sign it falls in or get a list of all zodiac signs. Now includes Chinese zodiac signs and elements!

NuGet NuGet Downloads Azure DevOps builds Azure DevOps tests

How to use

Installation

Library can either be directly downloaded from Nuget.org, OR installed via the NuGet Package Manager UI or via the Package Manager Console if you're using Visual Studio.

Command to install Horoscope NuGet via the Package Manager Console UI in Visual Studio shown below.

PM> Install-Package Horoscope 

Usage

Include the namespace in your program.

using Horoscope;

Then go ahead and consume it.

var zodiacSign = Zodiac.GetZodiacSignForDate(new DateTime(1950, 2, 12));

Another simpler option if all you need is the zodiac sign for a single date is:

var givenDateTime = new DateTime(1995, 8, 26);
var zodiacSign = givenDateTime.GetZodiacSign();

More examples

Horoscope.Zodiac
Horoscope.ChineseZodiac

Release notes

Find release notes here.

Credits

(c) 2018 Clyde D'Souza
Icon credits: Firkin

horoscope-nuget's People

Contributors

clydedz avatar lfmundim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lfmundim

horoscope-nuget's Issues

Add extension method option

Select type of issue

  • Bug
  • Feature request

If it's a feature request...

Please explain your request and why you'd like to see it in this service.
Currently to use the library we need to call the Zodiac class directly. C# enables us to use extension methods. This could make us simply call .GetZodiacSign() from a DateTime instance and have the code simpler and shorter.

// now
Zodiac.GetZodiacSignForDate(dateTime);

// suggested
dateTime.GetZodiacSign();

I could implement it :)

Add Hacktoberfest tag

Select type of issue

  • Bug
  • Feature request

If it's a feature request...

Please explain your request and why you'd like to see it in this service.
Include the hacktoberfest tag so PRs on this can count for the event! I actually enjoy this repo and would like to add a new feature to it, specially if it would count as a contribution for Hacktoberfest :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.