예제 #1
0
        private void dtp_fiscal_year_to_ValueChanged(object sender, EventArgs e)
        {
            NepaliDateConverter.DateConverter dp = new NepaliDateConverter.DateConverter();

            var    nepalidate = dp.EngToNep(Convert.ToInt32(dtp_fiscal_year_to.Value.Year), Convert.ToInt32(dtp_fiscal_year_to.Value.Month), Convert.ToInt32(dtp_fiscal_year_to.Value.Day));
            string nyear      = nepalidate.ConvertedDate.Year.ToString();
            string nday       = nepalidate.ConvertedDate.Day.ToString();
            string nmonths    = nepalidate.ConvertedDate.Month.ToString();

            lbl_nepali_date_to.Text = nyear + "." + nmonths + "." + nday;
        }
예제 #2
0
        public string dateConvertToNepali(DateTime date)
        {
            NepaliDateConverter.DateConverter dp = new NepaliDateConverter.DateConverter();

            var    nepalidate        = dp.EngToNep(Convert.ToInt32(date.Year), Convert.ToInt32(date.ToString("MM")), Convert.ToInt32(date.ToString("dd")));
            string nyear             = nepalidate.ConvertedDate.Year.ToString();
            string nday              = nepalidate.ConvertedDate.Day.ToString();
            string nmonths           = nepalidate.ConvertedDate.Month.ToString();
            string nepaliDateConvert = nyear + ".0" + nmonths + "." + nday;

            return(nepaliDateConvert);
        }