How To Install joda-time on CentOS 7

In this tutorial we learn how to install joda-time on CentOS 7. joda-time is Java date and time API

Introduction

In this tutorial we learn how to install joda-time on CentOS 7.

What is joda-time

Joda-Time provides a quality replacement for the Java date and time classes. The design allows for multiple calendar systems, while still providing a simple API. The ‘default’ calendar is the ISO8601 standard which is used by XML. The Gregorian, Julian, Buddhist, Coptic, Ethiopic and Islamic systems are also included, and we welcome further additions. Supporting classes include time zone, duration, format and parsing.

We can use yum or dnf to install joda-time on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install joda-time.

Install joda-time on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install joda-time using yum by running the following command:

sudo yum -y install joda-time

Install joda-time on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install joda-time using dnf by running the following command:

sudo dnf -y install joda-time

How To Uninstall joda-time on CentOS 7

To uninstall only the joda-time package we can use the following command:

sudo dnf remove joda-time

References

Summary

In this tutorial we learn how to install joda-time on CentOS 7 using yum and dnf.