最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

添加hh:mm到hh:mm得到新的hh:mm然后返回新的日期

SEO心得admin34浏览0评论
本文介绍了添加hh:mm到hh:mm得到新的hh:mm然后返回新的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

this.returnDateTime = koputed(function() { var selectedHr,selectedMin,jd,day,hr,min; if (self.startTime().split(" ")[1] === "AM") { if (self.startTime() === '12:00 AM'||self.startTime() === '12:30 AM') { selectedHr = 0; } else { selectedHr = parseInt(self.startTime().split(" ")[0].split(":")[0]); } } else { if (self.startTime() === '12:00 PM'||self.startTime() === '12:30 PM') { selectedHr = 12; } else { selectedHr = parseInt(self.startTime().split(" ")[0].split(":")[0]) + 12; } } selectedMin= parseInt(self.startTime().split(" ")[0].split(":")[1]); jd=self.Duration().split(" ");//it will be variable based on distance(format is: 2 day 2hr 33min (or) 5hr 45min) if(jd[1]==="day(s)") { day=jd[0];hr=jd[2];min=jd[4]; }else if(jd[1]==="hr(s)"){hr=jd[0];min=jd[2]} var startDate=moment($('#startDate').val()).format("DD/MM/YYYY");// if it is 25/01/2016 /// how to add duration days hrs mins to the selected startDateand startTime and get the new date and time }

这里选择日期DD / MM / YYYY到startDate.Time(hh:mm AM / PM)成startTime 基于持续时间ime进入持续时间为ex:3天4小时30分钟或者有时基于距离我只有小时分钟。 然后如何为startTime添加持续时间并获得新的约会时间

here am selecting date DD/MM/YYYY into startDate.Time(hh:mm AM/PM) into startTime based on duration am getting time into Duration as ex:3days 4 hrs 30min or sometimes based on distance am getting hrs min only. then how to add duration to startTime and get new date time

推荐答案

(' #startDate') .val())。format( DD / MM / YYYY); // 如果是25/01/2016 /// 如何将持续时间hrs分钟添加到选定的startDate和startTime并获取新的日期和时间 } ('#startDate').val()).format("DD/MM/YYYY");// if it is 25/01/2016 /// how to add duration days hrs mins to the selected startDateand startTime and get the new date and time }

b $ b 这里选择日期DD / MM / YYYY到startDate.Time(hh:mm AM / PM)进入startTime 基于持续时间我是否有时间进入持续时间为例如:3天4小时30分钟或有时基于距离我只有小时分钟。 然后如何t o为startTime添加持续时间并获取新的日期时间

here am selecting date DD/MM/YYYY into startDate.Time(hh:mm AM/PM) into startTime based on duration am getting time into Duration as ex:3days 4 hrs 30min or sometimes based on distance am getting hrs min only. then how to add duration to startTime and get new date time

发布评论

评论列表(0)

  1. 暂无评论