mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-26 00:04:03 -04:00 
			
		
		
		
	including replacement of todate and tointerval, use of third person conjugation and addition/fix of examples
		
			
				
	
	
		
			18 lines
		
	
	
		
			842 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			842 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| {
 | |
|   "name": "week",
 | |
|   "type": "function",
 | |
|   "description": "Extracts the week number from a date, or the number of weeks from an interval.",
 | |
|   "variants": [
 | |
|   { "variant": "Date variant",
 | |
|       "variant_description": "Extracts the week number from a date or datetime.",
 | |
|       "arguments": [ {"arg":"date","description":"a date or datetime value"}],
 | |
|       "examples": [ { "expression":"week('2012-05-12')", "returns":"19"}] },
 | |
|       {
 | |
|       "variant": "Interval variant",
 | |
|       "variant_description": "Calculates the length in weeks of an interval.",
 | |
|       "arguments": [ {"arg":"interval","description":"interval value to return number of months from"}],
 | |
|       "examples": [ { "expression":"week(to_interval('3 weeks'))", "returns":"3"},
 | |
|                     { "expression":"week(age('2012-01-01','2010-01-01'))", "returns":"104.285"}]
 | |
|   }]
 | |
| }
 |