get minutes from time (hh:mm:ss)

Inputs

  • hh:mm:ss

Outputs

  • minutes

Neuron type

Best algorithm has been found - locked

Patterns

Pattern Input Output
1.
hh:mm:ss: 15:30:10
minutes: 30
2.
hh:mm:ss: 01:02:03
minutes: 2
3.
hh:mm:ss: 20:40:50
minutes: 40
4.
hh:mm:ss: 15:42:10
minutes: 42
5.
hh:mm:ss: 00:09:11
minutes: 9

Applicable neurons

  • Get substring between string1 and string2
  • Get after substring
  • Get before substring
  • character :
  • Round to an integer
  • Round down to an integer
  • Round up to an integer
  • Simple interest
  • Percentage (X% / 100)
  • Quadratic equation (ax¬≤ + bx + c = 0)
  • delete character at the end of a sentence
  • constant x.xxxx
  • a(?=b|c)

Algorithm

Test

Code made by AI:
/**
 * 8: 
 *
 * @return {Array}
 */
function neuron508()
{
return [8];
}

/**
 * 5: 
 *
 * @return {Array}
 */
function neuron505()
{
return [5];
}

/**
 * Connect - two inputs: 
 *
 * @param x1 Variable A
 * @param x2 Variable B
 * @return {Array}
 */
function neuron520(x1, x2)
{
return [x1.toString()+x2.toString()];
}

/**
 * Ascii code into character: 
 *
 * @param x1 ascii code
 * @return {Array}
 */
function neuron585(x1)
{
return [String.fromCharCode(x1)];
}

/**
 * character :: 
 * 
 * @return {Array}
 */
function neuron586()
{
  var outputs = [];

  arr = neuron508();
  outputs[0] = arr[0];

  arr = neuron505();
  outputs[1] = arr[0];

  arr = neuron520(outputs[0], outputs[1]);
  outputs[2] = arr[0];

  arr = neuron520(outputs[1], outputs[0]);
  outputs[3] = arr[0];

  arr = neuron585(outputs[3]);
  outputs[4] = arr[0];

  return[outputs[4]];
}


/**
 * Length of string: 
 *
 * @param x1 String
 * @return {Array}
 */
function neuron528(x1)
{
return[x1.toString().length];
}

/**
 * Length of string: 
 *
 * @param x1 String
 * @return {Array}
 */
function neuron528(x1)
{
return[x1.toString().length];
}

/**
 * Substring (startPosition, endPosition): Get substring from string - from position - to pos
 *
 * @param x1 MyString
 * @param x2 start position
 * @param x3 end position
 * @return {Array}
 */
function neuron525(x1, x2, x3)
{
return[x1.toString().substring(x2, x3)];
}

/**
 * Substring (from position to end): 
 * 
 * @param x1 MyString
 * @param x2 start position
 * @return {Array}
 */
function neuron529(x1, x2)
{
  var outputs = [];
  outputs[0] = x1;
  outputs[1] = x2;

  arr = neuron528(outputs[0]);
  outputs[2] = arr[0];

  arr = neuron525(outputs[0], outputs[1], outputs[2]);
  outputs[3] = arr[0];

  return[outputs[3]];
}


/**
 * Position: Search position substring of string
 *
 * @param x1 MyString
 * @param x2 FindMe
 * @return {Array}
 */
function neuron523(x1, x2)
{
return [x1.toString().indexOf(x2.toString())];
}

/**
 * Get after substring: 
 * 
 * @param x1 MyString
 * @param x2 Substring
 * @return {Array}
 */
function neuron531(x1, x2)
{
  var outputs = [];
  outputs[0] = x1;
  outputs[1] = x2;

  arr = neuron528(outputs[1]);
  outputs[2] = arr[0];

  arr = neuron529(outputs[0], outputs[2]);
  outputs[3] = arr[0];

  arr = neuron523(outputs[0], outputs[1]);
  outputs[4] = arr[0];

  arr = neuron529(outputs[3], outputs[4]);
  outputs[5] = arr[0];

  return[outputs[5]];
}


/**
 * 8: 
 *
 * @return {Array}
 */
function neuron508()
{
return [8];
}

/**
 * 5: 
 *
 * @return {Array}
 */
function neuron505()
{
return [5];
}

/**
 * Connect - two inputs: 
 *
 * @param x1 Variable A
 * @param x2 Variable B
 * @return {Array}
 */
function neuron520(x1, x2)
{
return [x1.toString()+x2.toString()];
}

/**
 * Ascii code into character: 
 *
 * @param x1 ascii code
 * @return {Array}
 */
function neuron585(x1)
{
return [String.fromCharCode(x1)];
}

/**
 * character :: 
 * 
 * @return {Array}
 */
function neuron586()
{
  var outputs = [];

  arr = neuron508();
  outputs[0] = arr[0];

  arr = neuron505();
  outputs[1] = arr[0];

  arr = neuron520(outputs[0], outputs[1]);
  outputs[2] = arr[0];

  arr = neuron520(outputs[1], outputs[0]);
  outputs[3] = arr[0];

  arr = neuron585(outputs[3]);
  outputs[4] = arr[0];

  return[outputs[4]];
}


/**
 * Position: Search position substring of string
 *
 * @param x1 MyString
 * @param x2 FindMe
 * @return {Array}
 */
function neuron523(x1, x2)
{
return [x1.toString().indexOf(x2.toString())];
}

/**
 * 0: 
 *
 * @return {Array}
 */
function neuron500()
{
return [0];
}

/**
 * Substring (startPosition, endPosition): Get substring from string - from position - to pos
 *
 * @param x1 MyString
 * @param x2 start position
 * @param x3 end position
 * @return {Array}
 */
function neuron525(x1, x2, x3)
{
return[x1.toString().substring(x2, x3)];
}

/**
 * Get before substring: 
 * 
 * @param x1 MyString
 * @param x2 Substring
 * @return {Array}
 */
function neuron532(x1, x2)
{
  var outputs = [];
  outputs[0] = x1;
  outputs[1] = x2;

  arr = neuron523(outputs[0], outputs[1]);
  outputs[2] = arr[0];

  arr = neuron500();
  outputs[3] = arr[0];

  arr = neuron525(outputs[0], outputs[2], outputs[3]);
  outputs[4] = arr[0];

  return[outputs[4]];
}


/**
 * Round down to an integer: floor(x)
 *
 * @param x1 Value
 * @return {Array}
 */
function neuron625(x1)
{
return[Math.floor(Number(x1))]
}

/**
 * get hours from time (hh:mm:ss): 
 * 
 * @param x1 time (hh:mm:ss)
 * @return {Array}
 */
function neuron889(x1)
{
  var outputs = [];
  outputs[0] = x1;

  arr = neuron586();
  outputs[1] = arr[0];

  arr = neuron532(outputs[0], outputs[1]);
  outputs[2] = arr[0];

  arr = neuron625(outputs[2]);
  outputs[3] = arr[0];

  return[outputs[3]];
}


/**
 * get minutes from time (hh:mm:ss): 
 * 
 * @param x1 hh:mm:ss
 * @return {Array}
 */
function neuron890(x1)
{
  var outputs = [];
  outputs[0] = x1;

  arr = neuron586();
  outputs[1] = arr[0];

  arr = neuron531(outputs[0], outputs[1]);
  outputs[2] = arr[0];

  arr = neuron889(outputs[2]);
  outputs[3] = arr[0];

  return[outputs[3]];
}


Code made by AI:

Create your family tree for free