Git Product home page Git Product logo

dates's Introduction

Date program

This project aims to demonstrate proficiency in C programming.

Available date functions

/**
 * @brief Initialise the date using the computer system's clock.
 */
void init_date(DATE_T *date);

/**
 * @brief Modify the date to the specified day, month and year.
 */
void set_date_to(DATE_T *date, int day, int month, int year);

/**
 * @brief Returns whether or not two dates are equal.
 */
int date_equal(const DATE_T *d1, const DATE_T *d2);

/**
 * @brief Returns whether d1 < d2 or not.
 */
int date_less_than(const DATE_T *d1, const DATE_T *d2);

/**
 * @brief Returns whether d1 > d2 or not.
 */
int date_greater_than(const DATE_T *d1, const DATE_T *d2);

/**
 * @brief Format the date's attributes into 'str'.
 *
 * The buffer must be large enough (19 bytes should be the most required).
 */
void format_date(const DATE_T *date, char *str);

/**
 * @brief Returns whether or not the year is leap.
 */
int leap_year(int year);

/**
 * @brief Returns the number of days for the specified month.
 */
int month_length(int month, int leap);

/**
 * @brief Compute the next date by updating day, month and year accordingly.
 */
void next_day(DATE_T *date);

dates's People

Contributors

ximaz avatar jacobsomer avatar

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.