title: How can I get year from date
body: <p>I want to get year from date in <code>mongodb</code>.
  This is my simple script :</p>
  
  <pre><code>DateTime sDate = DateTime.SpecifyKind(new DateTime(2013, 1, 15, 00, 00, 00), DateTimeKind.Utc);
  DateTime eDate = DateTime.SpecifyKind(new DateTime(2014, 12, 31, 23, 59, 59), DateTimeKind.Utc);
  
  string map = @ "function(){
                                  emit (_id.OwnerId, _id.Date {
                                      Date: Value.Date.getYear(),
                                      PurchaseAmount: parseFloat(Value.PurchaseAmount),
                                      PurchaseReturnAmount: parseFloat(Value.PurchaseReturnAmount),
                                      TotalAmount: parseFloat(Value.TotalAmount)
                                  });
                             }";
  string reduce = @ "function (key, values) {
                          var outValue = {purchsaeAmount:0 , purchaseReturnAmount:0, totalAmount:0 }
                          values.forEach(function (value) {
                          outValue.PurchaseAmount +=parseFloat(value.PurchaseAmount);
                          outValue.PurchaseReturnAmount +=parseFloat(value.PurchaseReturnAmount);
                          outValue.TotalAmount +=parseFloat(value.TotalAmount);
                          });
                              return outValue;
                          }";
  </code></pre>
  
  <p>In map I want to get only year, how  can I get start year(2013) and end year(2014)?</p>