Trying to calculate value based on rounding up and then calculate date range excluding weekends..
hi
i creating simple design studion project request form user can enter how many photographs need ordered. calling field 'numimages'. once data entered, field (i calling numdaysimage) calculated based on fact no more 5 photographs can shot per day. so, 1-5 photos = 1 day. 6-10 photos = 2 days. 11-15 photos = 3 days etc. not need calculate part days, 6 photos same 10 i.e. 2 days.
once have calcuated 'numdaysimage', need calculate end date called 'datedue'. start date entered user in field 'datestart'.
i know not going easy, how can calculate 'datedue' based on mon-fri working week, , ideally excluding uk public holidays?
also on form value 'numdays' number of days designing brochure photos. value have calculated already, need added 'numdaysimage' total number of production days used calculate 'datedue'.
any appreciated. thanks.
javascript has math.ceil method rounds number next integer if not integer.
dates more complicated calculation starting date needs converted number , 1 can calculate ending date , test date see if sunday or saturday. intervening weekends add number of days processing.
More discussions in JavaScript
adobe
Comments
Post a Comment