title: KnockoutJS - split a string
body: <p>Something that should be so simple, has been driving me nuts in Knockoutjs. Just to split an incoming string. </p>
  
  <p>I have opts.value() from the calendar coming in and want to split it to remove the time, but it keeps returning "not a function". and doesn't like .split. Any ideas?</p>
  
  <pre><code>self.ShortDate = ko.computed(function () {
          return self.opts.value().split(" ",4);
      }, self);
  </code></pre>
  
  <p>Here is the string that is returned by opts.value "Wed Oct 14 2015 00:00:00 GMT+1300 (New Zealand Standard Time)"</p>
  
  <p>Sorry for not including the VM, here is the relevant part from the <a href="https://github.com/MakerStudios/ko-calendar" rel="nofollow">https://github.com/MakerStudios/ko-calendar</a> </p>
  
  <pre><code>self.opts = {
          value: ko.observable(),
          DateFromIn: ko.observable(),
          current: new Date(),
          deselectable: true,
          showCalendar: true,
          showToday: true,
          showTime: false,
          showNow: false,
          militaryTime: false,
          min: null,
          max: null,
          autoclose: false,
  </code></pre>