{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# <center>Arrow Module [27 exercises with solution]</center>" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Arrow Module**\n", "\n", "- Arrow is a Python library that offers a sensible, human-friendly approach to creating, manipulating, formatting and converting dates, times, and timestamps. \n", "- It implements and updates the datetime type, plugging gaps in functionality, and provides an intelligent module API that supports many common creation scenarios. \n", "- Simply put, it helps you work with dates and times with fewer imports and a lot less code.\n", "- To install: `pip install arrow`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1. Write a Python program to get the current UTC datetime, local datetime and datetime of a given location using arrow module. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2. Write a Python program to create datetime from integers, floats and strings timestamps using arrow module." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. Write a Python program to create a datetime from a given timezone-aware datetime using arrow module. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4. Write a Python program to search a date from a given string using arrow module. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 5. Write a Python program to get a datetime or timestamp representation from current datetime. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 6. Write a Python program to extract year, month and date value from current datetime using arrow module. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 7. Write a Python program to get date and time properties from datetime function using arrow module." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 8. Write a Python program to replace hour, minute, day, month, year and timezone with specified value of current datetime using arrow." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 9. Write a Python program to convert timezone from local to utc, utc to local or specified zones." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 10. Write a Python program to create a string representation of the Arrow object, formatted according to a format string." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 11. Write a Python program to create a new Arrow object, cloned from the current one." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Problem's Source: [https://www.w3resource.com/python-exercises/arrow/index.php](https://www.w3resource.com/python-exercises/arrow/index.php)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }