Fix weeks not support in reminder command (#1977)
This commit is contained in:
		
							parent
							
								
									4be7f12119
								
							
						
					
					
						commit
						c492618d31
					
				@ -23,11 +23,11 @@ export function timeSince (timeStamp) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function datePivot (date,
 | 
			
		||||
  { years = 0, months = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0 }) {
 | 
			
		||||
  { years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0 }) {
 | 
			
		||||
  return new Date(
 | 
			
		||||
    date.getFullYear() + years,
 | 
			
		||||
    date.getMonth() + months,
 | 
			
		||||
    date.getDate() + days,
 | 
			
		||||
    date.getDate() + days + weeks * 7,
 | 
			
		||||
    date.getHours() + hours,
 | 
			
		||||
    date.getMinutes() + minutes,
 | 
			
		||||
    date.getSeconds() + seconds,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user