Posts

Nepali Calendar using php

example.php <?php include('nepali_calendar.php'); $cal = new Nepali_Calendar(); print_r ($cal->eng_to_nep(2008,11,23)); print_r($cal->nep_to_eng(2065,8,8)); ?> nepali_calendar.php  <?php  class Nepali_Calendar { private $bs = array( 0=>array(2000,30,32,31,32,31,30,30,30,29,30,29,31), 1=>array(2001,31,31,32,31,31,31,30,29,30,29,30,30), 2=>array(2002,31,31,32,32,31,30,30,29,30,29,30,30), 3=>array(2003,31,32,31,32,31,30,30,30,29,29,30,31), 4=>array(2004,30,32,31,32,31,30,30,30,29,30,29,31), 5=>array(2005,31,31,32,31,31,31,30,29,30,29,30,30), 6=>array(2006,31,31,32,32,31,30,30,29,30,29,30,30), 7=>array(2007,31,32,31,32,31,30,30,30,29,29,30,31), 8=>array(2008,31,31,31,32,31,31,29,30,30,29,29,31), 9=>array(2009,31,31,32,31,31,31,30,29,30,29,30,30), 10=>array(2010,31,31,32,32,31,30,30,29,30,29,30,30), 11=>array(2011,31,32,31,32,31,30,30,30,29,29,30,31), 12=>array(2012

Nepali Calender in Visual Basic

Image
Download File: https://drive.google.com/open?id=1rBzvTj1QjX1eRHMjUKW7ILnapQbqbhLM https://drive.google.com/open?id=16qytVl8bQWpHVPK-hsfJ1nyu-sNjOJhK

http://sajanmaharjan.com.np/my-works/nepali-functions-addin-for-excel/

Image
http://sajanmaharjan.com.np/my-works/nepali-functions-addin-for-excel/ It has been sometime that people had been requesting for an excel utility that would perform the date conversion from AD to BS and vice versa in Excel itself. Finally, I have had the time to program it and hope that it can help you in some way. You can download the file here. DOWNLOAD SAJAN.NEPALI.FUNCTIONS.V6.XLAM Available Functions Example Description AD2BS( “enter_ad_date” ) AD2BS( "12/25/2016") AD date format ( MM/DD/YYYY ) BS2AD( “enter_bs_date” ) BS2AD( "2073/12/25") BS date format ( YYYY/MM/DD ) number2words( enter_number ) number2words( 123 ) Returns the result in preeti font number2words_preeti( enter_number, show_units ) number2words_preeti( 123 ) Returns the result in preeti font. Here show_units is optional and set to false by default; Shows paisa count if set to true. number2words_unicode( enter_number, show_units ) number2words_unicode( 123 ) Returns the result i

Autocad calculation using fields and blocks

Image
While drafting in AutoCAD, sometimes we come to situation where we need to upadate some text based on values of other text (similar to using formulas as in excel). In such case we can use FIELDS of Autocad to do our calculations and update the drawings automatically. Basics: The basic method to use field is very easy. Try following steps to get the idea. >>MTEXT (type some number say 151) and click ok >>MTEXT>Instert Field (or directly use FIELD command) : a dialog box will appear as shown below -Select Field category: Objects -Field names: Formula -In F o rmula filed: right click >insert field : this will open new field window (the idea is use field value within another field) -In this new Filed dialog box choose -Filed names: Objects -Objet type:Select the Mtext with the input number -Property:Contents -Click Ok Now in the original window there will be some value like 151 at the end type *2 so the content will look like 151*2 -Click

Algorithm for Nepali date conversion

https://nirmaljoshi.wordpress.com/2010/09/12/algorithm-for-nepali-date-conversion/ If you are looking for code to put in your website visit  http://nepalidateconve.sourceforge.net/  to download php code. …..i don’t have time to read..download  NepaliDateConverterAddIn.xlsm  now. The codes Nepali date conversion consists of two parts A. Data of number of days that occur in each month in each year. This is the reason why all the Nepali date conversion programs have its limitations B. Algorithm to convert the date from AD to BS or vice versa. This is explained with the code in VBA (in Excel) below with the required steps. 1. Open MS Excel 2. Open Visual Basic editor (short cut Alt + F11) 3. Insert a class module 4. Rename the class module to  Nepali_Calender  in Properties window (F4) 5. Paste the code 1 given at the end of this article 6. Insert a Module (normal module not class module!) and Paste the code 2 . It consists of two functions : a. nepaliToEnglish(y,m,d,forma