How To Install libdate-calc-perl on Ubuntu 20.04

In this tutorial we learn how to install libdate-calc-perl on Ubuntu 20.04. libdate-calc-perl is Perl library for accessing dates

Introduction

In this tutorial we learn how to install libdate-calc-perl on Ubuntu 20.04.

What is libdate-calc-perl

libdate-calc-perl is:

Date::Calc is a Perl module which provides a variety of date calculations based on the Gregorian calendar (the one used in Western countries today), complying with the ISO/R 2015-1971 and DIN 1355 standards which specify things such as what leap years are, when they occur, how the week numbers are defined, what’s the first day of the week, how many weeks (52 or 53) a given year has, and so on.

Although the Gregorian calendar was only adopted 1582 by most (not all) European countries (some countries continued to use the Julian calendar until as late as the beginning of the 20th century!), this package allows you to extrapolate the Gregorian calendar back until the year 1.

If Date::Calc::XS (libdate-calc-xs-perl) is available, this package will automatically accelerate its operation using the C/XS implementation.

There are three methods to install libdate-calc-perl on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libdate-calc-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libdate-calc-perl using apt-get by running the following command:

sudo apt-get -y install libdate-calc-perl

Install libdate-calc-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libdate-calc-perl using apt by running the following command:

sudo apt -y install libdate-calc-perl

Install libdate-calc-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libdate-calc-perl using aptitude by running the following command:

sudo aptitude -y install libdate-calc-perl

How To Uninstall libdate-calc-perl on Ubuntu 20.04

To uninstall only the libdate-calc-perl package we can use the following command:

sudo apt-get remove libdate-calc-perl

Uninstall libdate-calc-perl And Its Dependencies

To uninstall libdate-calc-perl and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove libdate-calc-perl

Remove libdate-calc-perl Configurations and Data

To remove libdate-calc-perl configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge libdate-calc-perl

Remove libdate-calc-perl configuration, data, and all of its dependencies

We can use the following command to remove libdate-calc-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libdate-calc-perl

References

Summary

In this tutorial we learn how to install libdate-calc-perl package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.