using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Petrol_Bunk.Models
{
    public class Reverse_Date
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Date"></param>
        /// <returns></returns>
        public static string ReverseDDMMYYY(string Date = "")
        {
            string[] val = Date.Split('-');
            Date = val[2] + "-" + val[1] + "-" + val[0];

            return Date;
        }
        /// <summary>
        /// 22-04-2021
        /// returns: 2021-
        /// </summary>
        /// <param name="Date"></param>
        /// <returns></returns>
        public static string ReverseYYYMMDD(string Date = "")
        {
            //09-04-2021
            string[] val = Date.Split('-');
            Date = val[2] + "-" + val[1] + "-" + val[0];

            return Date;
        }
    }
}